Solved by ptrblck in post #15 
              
              
                Sure, then you would have to call F.log_softmax(output) before passing it to NLLLoss or add it as a layer in your model. 
CrossEntropyLoss basically combines a log_softmax with NLLLoss.