made appropriate changes, ran the code you’ve given in a separate file and it worked, then i ran my own code as the following:
import torch
import torch.nn as nn
from torch.autograd import Variable
import pandas as pd
import numpy as np

train = pd.read_csv('train.csv')

train_x = np.array(train['x'])
train_y = np.array(train['y'])

class Linear_Regress(nn.Module):
    def __init__(self, input_sz, output_sz):
        super(Linear_Regress, self).__init__()
        self.linear = nn.Linear(input_sz, output_sz)
    
    def forward(self, x):
        out = self.linear(x)
        return out

model = Linear_Regress(1,1)
criterion = nn.MSELoss()
lrn_rt = 0.01
optm = torch.optim.SGD(model.parameters(), lr = lrn_rt)

epochs = 100

x_in = torch.from_numpy(train_x).to(torch.float)
y_out = torch.from_numpy(train_y).to(torch.float)

for e in range(epochs):
    e += 1
    
    inps = Variable(x_in)
    outs = Variable(y_out)
    
    optm.zero_grad()
    outputs = model.forward(inps)
    loss = criterion(outputs, outs)
    loss.backward()
    optm.step()
    
    print('epoch {}, loss {}'.format(e,loss.data[0]))

and its giving me this error now:

RuntimeError: size mismatch, m1: [1 x 700], m2: [1 x 1] at c:\programdata\miniconda3\conda-bld\pytorch_1524543037166\work\aten\src\th\generic/THTensorMath.c:2033

originating from the same troublesome area:

outputs = model.forward(inps)