Solved by KFrank in post #2 
              
              
                Hello Abishek! 
I’m not sure that you’re describing what you are doing consistently. 
However, here are some comments based on some of the things 
you say. 

This is backwards.  For CrossEntropyLoss you do not use a 
one-hot-encoded label vector.  Rather, you use a single integer 
class label (per p…