Hi all.i am new to pytorch and i am trying to implement linear regression through the following code
import torch
from torch.autograd import Variable
x=[[1.2,1.3],[1.6,1.3],[1.9,1.2],[1.4,1.5],[1.3,1.9]]
y=[[2.5],[2.9],[3.1],[2.9],[3.2]]

x_data=Variable(torch.tensor(x))
y_data=Variable(torch.tensor(y))

class Model(torch.nn.Module):
    def __init__(self):
        super(Model,self).__init__()
        self.linear=torch.nn.Linear(2,1)
    def forward(self,x):
        return self.linear(x)


model=Model()

criterion=torch.nn.MSELoss()
optimizer=torch.optim.SGD(model.parameters(),lr=0.05)

for epoch in range(1000):
    y_pred=model(x_data)

    loss=criterion(y_pred,y_data)

    

    optimizer.zero_grad()
    loss.backward()
    optimizer.step()

print(list(model.parameters()))

The parameters of this model should be [[1.],[1.]] and [[0]].
but i am getting incorrect parameters like [[ 0.7835,  0.7870]] ,[ 0.6305]
whats wrong with my code?