Thanks for your response. I am using below training routine.
def train(model,trainloader,testloader,criterion,optimizer,epochs=3):
steps = 0
running_loss = 0
for e in range(epochs):
    model.train()
    for images,labels in trainloader:
        steps += 1
        optimizer.zero_grad()
        output = model.forward(images)
        loss = criterion(output,labels)
        loss.backward()
        optimizer.step()
        
        running_loss += loss.item()
        
    else:
        print("Epochs: {}/{}".format(e+1,epochs),
              "Training Loss: {:.3f}".format(running_loss/len(trainloader)))