If you would like to predict only one class, i.e. the probabilities of all classes should sum to one, you should apply F.softmax(x, dim=1).
Otherwise, if multiple classes out your output could be correct, you could apply F.sigmoid(x).
The first approach is more likely. The second approach is used for multi-label classification tasks.
EDIT:
As a side note: I wouldn’t recommend adding F.softmax into the model definition, since you would need another F.log() outside on the model to apply nn.NLLLoss, which could be numerically unstable.
Just return your logits, apply nn.CrossEntropyLoss and see your probabilities outside the model with F.softmax.