Solved by ptrblck in post #2 
              
              
                The training loop looks alright. 
Are you working on a multi-label (each sample belongs to 0, 1 or more classes) or multi-class (each sample belongs to a single class only) classification? 
In the former case nn.NLLLoss is most likely the wrong criterion to use. 
Also, what did you change in the res…