파이토치 3-3. 다중 선형 회귀


파이토치 3-3. 다중 선형 회귀

이제 독립변수 x가 하나가 아니라 여러개인 훈련 데이터이다. import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim x1_train = torch.FloatTensor([[73], [93], [89], [96], [73]]) x2_train = torch.FloatTensor([[80], [88], [91], [98], [66]]) x3_train = torch.FloatTensor([[75], [93], [90], [100], [70]]) y_train = torch.FloatTensor([[152], [185], [180], [196], [142]]) w1 = torch.zeros(1, requires_grad=True) w2 = torch.zeros(1, requires_grad=True) w3 = torch.zeros(1, requires_grad=True) b ...



원문링크 : 파이토치 3-3. 다중 선형 회귀