There is a small mismatch between the output non-linearity and the criterion.
If you would like to use nn.CrossEntropyLoss, you would have to pass the raw logits (without any non-linearity) to the criterion, as internally F.log_softmax will be applied.
Alternatively, you could use one output neuron, apply F.sigmoid, and use nn.BCELoss as your criterion.