If you are dealing with a multi-class classification use case and your target tensor contains class indices, you should use nn.NLLLoss as your criterion.
Alternatively, you could also remove the F.Log_softmax from your model and use nn.CrossEntropyLoss (identical to F.log_softmax + nn.NLLLoss).
However, if you are dealing with a multi-label classification (each sample can have more than a single active class), you should remove the F.log_softmax and would have to provide a target for each class output.