Solved by ptrblck in post #2 
              
              
                nn.CrossEntropyLoss uses F.log_softmax and nn.NLLLoss internally, so it expects raw logits as the model outputs. 
Remove the F.softmax at the end of your model and pass the output of self.lin(3) directly to the criterion. 
Let me know, if that helps.