Solved by KFrank in post #2 
              
              
                Hi Shar! 

Your labels has one too many dimensions.  It appears that 
you are using a cross–entropy-type loss criterion.  Pytorch’s 
CrossEntropyLoss (and related loss criteria) expect your 
outputs to have shape [nBatch, nClass] and your labels 
to have shape [nBatch] (with no nClass dimension).  I…