Solved by ptrblck in post #2 
              
              
                This comment is wrong and might come from an older code snippet: 
criterion = torch.nn.MSELoss()    # Softmax is internally computed.

For a multi-class classification, I would recommend to use nn.CrossEntropyLoss and pass the targets as class indices to the criterion. 
You could create the class in…