Skip to content

DOC: Clarify that CrossEntropyLoss mean is weighted#40991

Closed
peterbell10 wants to merge 1 commit intopytorch:masterfrom
peterbell10:cross_entropy-docs
Closed

DOC: Clarify that CrossEntropyLoss mean is weighted#40991
peterbell10 wants to merge 1 commit intopytorch:masterfrom
peterbell10:cross_entropy-docs

Conversation

@peterbell10
Copy link
Copy Markdown
Collaborator

Closes #40560

This adds the equation for the weighted mean to CrossEntropyLoss's docs and the reduction argument for CrossEntropyLoss and NLLLoss no longer describes a non-weighted mean of the outputs.

@peterbell10 peterbell10 requested a review from ezyang July 5, 2020 19:10
@peterbell10 peterbell10 requested a review from apaszke as a code owner July 5, 2020 19:10
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@ezyang merged this pull request in 35bd2b3.

csarofeen pushed a commit to csarofeen/pytorch that referenced this pull request Jul 7, 2020
Summary:
Closes pytorch#40560

This adds the equation for the weighted mean to `CrossEntropyLoss`'s docs and the `reduction` argument for `CrossEntropyLoss` and `NLLLoss` no longer describes a non-weighted mean of the outputs.

Pull Request resolved: pytorch#40991

Differential Revision: D22395805

Pulled By: ezyang

fbshipit-source-id: a623b6dd2aab17220fe0bf706bd9b62d6ba531fd
csarofeen added a commit to csarofeen/pytorch that referenced this pull request Aug 16, 2020
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Closes pytorch#40560

This adds the equation for the weighted mean to `CrossEntropyLoss`'s docs and the `reduction` argument for `CrossEntropyLoss` and `NLLLoss` no longer describes a non-weighted mean of the outputs.

Pull Request resolved: pytorch#40991

Differential Revision: D22395805

Pulled By: ezyang

fbshipit-source-id: a623b6dd2aab17220fe0bf706bd9b62d6ba531fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'mean' reduction result in CrossEntropyLoss mismatches with manually computing mean

4 participants