If you use F.log_softmax(x, 1), then you would have to use nn.NLLLoss as your criterion.
For a standard multi-class classification use case you would have these options:

raw logits (no output non-linearity) + nn.CrossentropyLoss


F.log_softmax + nn.NLLLoss


Let me know, if this fixes your training.