Closed acmoudleysa closed 1 year ago
Hi there, thanks for the note. The Softmax function should not be included of you use CrossEntropyLoss in PyTorch since the loss already performs Softmax implicitly. Thanks for commenting, though. Let me know if you have any questions, happy to discuss.
The note mentions that the softmax function is used at the end, but it's missing in the code you've provided.
all_layers.append(nn.Linear(hidden_units[-1], 10))
To be added:
all_layers.append(torch.softmax(dim=1))