Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CrossEntropyLoss with LogSoftmax? #3

Open
WenWeiKun-byte opened this issue Jan 3, 2019 · 1 comment
Open

CrossEntropyLoss with LogSoftmax? #3

WenWeiKun-byte opened this issue Jan 3, 2019 · 1 comment

Comments

@WenWeiKun-byte
Copy link

('sig7', nn.LogSoftmax(dim=-1))

I think there is no need to put LogSoftmax layer at the end of network if you are going to use CrossEntropyLoss ? Because CrossEntropyLoss combines nn.LogSoftmax() and nn.NLLLoss() in one single class.

@skyqwe123
Copy link

('sig7', nn.LogSoftmax(dim=-1))

I think there is no need to put LogSoftmax layer at the end of network if you are going to use CrossEntropyLoss ? Because CrossEntropyLoss combines nn.LogSoftmax() and nn.NLLLoss() in one single class.

@Frusciante @activatedgeek I think so. But I am not understand this:
x = self.c2_1(output) output = self.c2_2(output) output += x
It seems that C3 layer is not realized in this way。

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

No branches or pull requests

2 participants