ACGAN-PyTorch
ACGAN-PyTorch copied to clipboard
Change Softmax to LogSoftmax to use NLLLoss.
Fix #3.
From here, it is LogSoftmax
should be used for NLLLoss
, instead of Softmax
.
This module doesn’t work directly with NLLLoss, which expects the Log to be computed between the Softmax and itself. Use LogSoftmax instead (it’s faster and has better numerical properties).
That's right. CrossEntropyLoss = LogSoftmax + NLLLoss.