Open jensqin opened 2 years ago
Thank you for raising the question, @jensqin! It looks like we could avoid softmax here. The documentation in PyTorch though calls softmax in the examples as well: https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html?highlight=crossentropyloss#torch.nn.CrossEntropyLoss
cc: @vivekmig
📚 Documentation
In the Titanic Data Analysis tutorial, the use of CrossEntropyLoss is inappropriate. From the documentation of pytorch, CrossEntropyLoss is a combination of LogSoftmax and NLLLoss, so the last Softmax layer of TitanicSimpleNNModel is redundant.