It depends on your use case and e.g. the loss function you are using.
nn.CrossEntropyLoss expects raw logits for example, while nn.NLLLoss expects log probabilities (F.log_softmax applied to the last layer).
Without some more information it is hard to answer your general questions.