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

Fix docstring of logitcrossentropy #1165

Merged
merged 1 commit into from
May 19, 2020
Merged

Fix docstring of logitcrossentropy #1165

merged 1 commit into from
May 19, 2020

Conversation

cossio
Copy link
Contributor

@cossio cossio commented May 5, 2020

Since y is a logit, there is no log (see the diff).

@cossio cossio changed the title Fix docstring of logitbinarycrossentropy and logitcrossentropy Fix docstring of logitcrossentropy May 5, 2020
@@ -91,7 +91,7 @@ Return the crossentropy computed after a [`Flux.logsoftmax`](@ref) operation;
calculated as `-sum(y .* logsoftmax(ŷ) .* weight) / size(y, 2)`.

`logitcrossentropy(ŷ, y)` is mathematically equivalent to
[`Flux.crossentropy(softmax(log(ŷ)), y)`](@ref) but it is more numerically stable.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a logit, not a probability. Therefore there is no log.

@DhairyaLGandhi
Copy link
Member

bors r+

@DhairyaLGandhi
Copy link
Member

Thanks!

@bors
Copy link
Contributor

bors bot commented May 19, 2020

Build succeeded:

@bors bors bot merged commit 87ba651 into FluxML:master May 19, 2020
@cossio cossio deleted the patch-1 branch May 19, 2020 12:42
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