Skip to content

Fix binary_cross_entropy_with_logits#12624

Closed
seayoung1112 wants to merge 1 commit intopytorch:masterfrom
seayoung1112:export-D10372032
Closed

Fix binary_cross_entropy_with_logits#12624
seayoung1112 wants to merge 1 commit intopytorch:masterfrom
seayoung1112:export-D10372032

Conversation

@seayoung1112
Copy link
Copy Markdown
Contributor

Summary: binary_cross_entropy_with_logits is broken when redcue is not None

Differential Revision: D10372032

Copy link
Copy Markdown
Collaborator

@ssnl ssnl left a comment

Choose a reason for hiding this comment

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

  1. Could you instead use the pattern used in other places, and replace legacy_get_string with legacy_get_enum?
  2. Need some tests

cc @ailzhang this may be why you get different numbers.. It is sooooo bad that our argparser accepted string reduction!

@seayoung1112
Copy link
Copy Markdown
Contributor Author

@ssnl can we do it in another diff? I'm doing this as a fastest way to unblock our training pipeline from this bug

@soumith
Copy link
Copy Markdown
Collaborator

soumith commented Oct 15, 2018

@seayoung1112 we should add quick tests in test_nn.py. After that this can be shipped, and you can follow-up on (1) in a later diff.

@ssnl
Copy link
Copy Markdown
Collaborator

ssnl commented Oct 15, 2018

(1) is just a 1-line change and is shorter than your current fix though...

Summary: binary_cross_entropy_with_logits is broken when redcue is not None

Differential Revision: D10372032

fbshipit-source-id: 30a9b21623fa2e67f554aa5b587aa285322d2456
@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Oct 15, 2018

test is broken. Give it a different name.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fix pytorch#12624 . internal usecase of legacy `reduce`.
Add test in test_nn
Pull Request resolved: pytorch#12689

Reviewed By: ezyang

Differential Revision: D10391195

Pulled By: ailzhang

fbshipit-source-id: 1af2b258c4abb2b6527eaaeac63e8bf1762c66a1
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.

4 participants