ACGAN-PyTorch icon indicating copy to clipboard operation
ACGAN-PyTorch copied to clipboard

Change Softmax to LogSoftmax to use NLLLoss.

Open daa233 opened this issue 6 years ago • 1 comments

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).

daa233 avatar Mar 16 '18 01:03 daa233

That's right. CrossEntropyLoss = LogSoftmax + NLLLoss.

chaeunl avatar Mar 31 '19 06:03 chaeunl