Skip to content

Conversation

daa233
Copy link
Contributor

@daa233 daa233 commented Mar 16, 2018

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

@chaeunl
Copy link

chaeunl commented Mar 31, 2019

That's right. CrossEntropyLoss = LogSoftmax + NLLLoss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants