a =torch.tensor([])
total_step = len(xy)
loss_list = []
acc_list = []
for epoch in range(num_epochs):
#for data in x_loader:
total_trained=0
correctly_trained=0
for i in x_train,y_train:
    
    #criterion(outputs, y)

    outputs = model(x_train)
    
    loss = criterion(outputs, torch.max(y_train, 1)[1])
    loss_list.append(loss.item())
    
    

    # Backprop and perform Adam optimisation
    optimizer.zero_grad()
    loss.backward()
    optimizer.step()
#optimizer update the weight parameters to minimize the loss function
    total_trained += y_train.size(0)
    
    _ , predicted_labels = torch.max(outputs.data,1)

    correctly_trained += (y_train.data==predicted_labels).sum()

#Priniting the Accuracy and loss values for training data
print("Epoch:%d"%(epoch))
print("Training...")
print(" Accuracy:%f loss:%f"%((correctly_trained/total_trained)*100,loss))

this time the output is like this.
Epoch:0
Training…
Accuracy:116800.000000 loss:0.000000
Epoch:1
Training…
Accuracy:116800.000000 loss:0.000000