If you have a classification problem with multiple classes, you should return the log_softmax of the logits from your model and use NLLLoss. The architecture itself does not determine the loss function, but your classification problem.