Hi, there
trying to so linear regression with multi variable.
train_data = np.array([
[40,  6,  4],
[44, 10,  4],
[46, 12,  5],
[48, 14,  7],
[52, 16,  9],
[58, 18, 12],
[60, 22, 14],
[68, 24, 20],
[74, 26, 21],
[80, 32, 24]])
test_data = np.array([
[6, 4],
[10, 5],
[4, 8]])
x_train = train_data[:,1:3]
y_train = train_data[:,0]
POLY_DEGREE = 3
input_size = 2
output_size = 1
poly = PolynomialFeatures(input_size * POLY_DEGREE, include_bias=False)
x_train_poly = poly.fit_transform(x_train)
class LinearRegression(nn.Module):
def init(self,input_size,output_size):
super(LinearRegression,self).init()
self.linear = nn.Linear(input_size,output_size)
def forward(self,x):
    out = self.linear(x)
    return out

model = LinearRegression(input_size,output_size)
criterion = torch.nn.MSELoss()
optimizer = torch.optim.SGD(model.parameters(), lr=0.001)
losses = []
for epoch in range(50):
inputs = Variable(torch.from_numpy(x_train))
targets = Variable(torch.from_numpy(y_train))
    #feedforward + Backward + Optimize
    optimizer.zero_grad()
    outputs = model(inputs)

==============================================
error is following
TypeError: addmm_ received an invalid combination of arguments - got (int, int, torch.LongTensor, torch.FloatTensor), but expected one of:

(torch.LongTensor mat1, torch.LongTensor mat2)
(torch.SparseLongTensor mat1, torch.LongTensor mat2)
(int beta, torch.LongTensor mat1, torch.LongTensor mat2)
(int alpha, torch.LongTensor mat1, torch.LongTensor mat2)
(int beta, torch.SparseLongTensor mat1, torch.LongTensor mat2)
(int alpha, torch.SparseLongTensor mat1, torch.LongTensor mat2)
(int beta, int alpha, torch.LongTensor mat1, torch.LongTensor mat2)
(int beta, int alpha, torch.SparseLongTensor mat1, torch.LongTensor mat2)