When I am building a classifier in PyTorch, I have 2 options to do
- Using the
nn.CrossEntropyLoss
without any modification in the model - Using the
nn.NNLLoss
withF.log_softmax
added as the last layer in the model
So there are two approaches.
Now, what approach should anyone use, and why?