[pytorch] linear regression class를 nn.Sequential로 간단하게 표현
linear regression class를 nn.Sequential로 간단하게 표현 Linear regression 전체 코드 import torch import torch.nn.functional as F import torch.nn as nn import torch.optim as optim x_data = [[1,2], [2,3], [3,1], [4,3], [5,3], [6,2]] y_data = [[0], [0], [0], [1], [1], [1]] x_train = torch.FloatTensor(x_data) y_train = torch.FloatTensor(y_data) print(x_train.size()) print(y_train.size()) ''' class l..
더보기