If you are working on a multi-class classification use case and use nn.CrossEntropyLoss, your model should output raw logits, as internally nn.CrossEntropyLoss will apply F.log_softmax and nn.NLLLoss.