As @mailcorahul said, nn.NLLLoss expects the log probabilities, so you shouldn’t apply torch.exp on your output. Instead pass the F.log_softmax outputs directly to your criterion.
If you need to see the softmax probabilities, you can of course use torch.exp. Just don’t pass them to nn.NLLLoss.