Thanks for the reply. I have one more doubt
I am using google collab and while running its GPU,the GPU usage suddenly increases while compiling this line
correct_train += predicted.eq(labels_new.data).sum().item()
the shape of predicted size is torch.Size([291600])
cannot figure out why it does, is there any other method to write the same line of code which uses less memory
Maybe I am making some other mistake.