Note that nn.CrossEntropyLoss expects raw logits, which can take any value, while nn.NLLLoss expects log probabilities as the input.
Internally in nn.CrossEntropyLoss, F.log_softmax and nn.NLLLoss will be applied.
I’m not sure how you’ve calculated your output, but it doesn’t seem to contain log probabilities.