Anjali_Raj:

Basically, what I did is I tried to train the model on only one batch of batch size=16 in order to see if my weights are getting updated or not.


Try adding
net.train()

before the training loop. This sets the net to the training mode, where it can learn.