Thanks for the reply!
I tried with the following example:
inputs = np.array([[73, 67, 43], 
                   [91, 88, 64], 
                   [87, 134, 58], 
                   [102, 43, 37], 
                   [69, 96, 70]], dtype='float32')

targets = np.array([[56, 70], 
                    [81, 101], 
                    [119, 133], 
                    [22, 37], 
                    [103, 119]], dtype='float32')
X = torch.from_numpy(inputs)
y = torch.from_numpy(targets)

class MyModel(nn.Module):
    def __init__(self,input_dim,h,output_dim):
        super(MyModel,self).__init__()
        self.linear1 = nn.Linear(input_dim,h)
        self.act1 = nn.ReLU()
        self.linear2 = nn.Linear(h,output_dim)
    
    def forward(self, x):
        x = (self.linear1(x))
        x = (self.act1(x))
        x = (self.linear2(x))
        return x

input_dim = 3
h =10
output_dim = 2
model = MyModel(input_dim,h,output_dim)

mse = nn.MSELoss()
learning_rate = 0.005
optimizer = torch.optim.Adam(model.parameters(),lr = learning_rate)

loss_list = []
iteration_number = 100
for iteration in range(iteration_number):
    results = model(X)
    print(results)
    loss = mse(results, y)
    loss.backward()
    optimizer.zero_grad()
    optimizer.step()
    
    loss_list.append(loss.data)
if(iteration % 100 == 0):
    print('epoch {}, loss {}'.format(iteration, loss.data))

plt.plot(range(iteration_number),loss_list)
plt.xlabel("Number of Iterations")
plt.ylabel("Loss")
plt.show()

It appears my model doesn’t really learn since I get something like this all the time.
tensor([[-3.4838,  2.7143],
        [-3.8473,  4.5520],
        [-1.1620,  7.0547],
        [-7.8916, -2.1579],
        [-0.9408,  6.9475]]

Loss function doesn’t change as well.
Though, can’t get what is going wrong in the model.