Fix #11752: correct numerical issue with log_softmax#11866
Closed
sytrus-in-github wants to merge 1 commit intopytorch:masterfrom
Closed
Fix #11752: correct numerical issue with log_softmax#11866sytrus-in-github wants to merge 1 commit intopytorch:masterfrom
sytrus-in-github wants to merge 1 commit intopytorch:masterfrom
Conversation
soumith
approved these changes
Sep 19, 2018
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
soumith is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Collaborator
|
@sytrus-in-github thanks for the PR! Want to add a test for this too? :) |
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Sep 20, 2018
Summary: This fixes the numerical problem in log_softmax cpu code when inputs are big but their differences are small. Pull Request resolved: pytorch/pytorch#11866 Differential Revision: D9946799 Pulled By: soumith fbshipit-source-id: 11fe8d92b91ef6b7a66f33fbce37ec2f0f0929be
Contributor
Author
|
@ssnl Good point! Unfortunately I won't have time to look into it for a couple of weeks. If someone else want to contribute in the mean time, feel free to do so :) |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jun 17, 2019
Summary: #11866 has corrected this issue in function `host_softmax` (aten/src/ATen/native/SoftMax.cpp). But I tried the example proposed in #11752. `log_softmax` is still not working for big logits. I have looked into the source code, found that example had called `vec_host_softmax_lastdim`, not `host_softmax`. This code fixes the issue in `_vec_log_softmax_lastdim` and has a test for `log_softmax`. Pull Request resolved: #21672 Differential Revision: D15856327 Pulled By: VitalyFedyunin fbshipit-source-id: 7a1fd3c0a03d366c99eb873e235361e4fcfa7567
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Jun 17, 2019
Summary: pytorch/pytorch#11866 has corrected this issue in function `host_softmax` (aten/src/ATen/native/SoftMax.cpp). But I tried the example proposed in pytorch/pytorch#11752. `log_softmax` is still not working for big logits. I have looked into the source code, found that example had called `vec_host_softmax_lastdim`, not `host_softmax`. This code fixes the issue in `_vec_log_softmax_lastdim` and has a test for `log_softmax`. Pull Request resolved: pytorch/pytorch#21672 Differential Revision: D15856327 Pulled By: VitalyFedyunin fbshipit-source-id: 7a1fd3c0a03d366c99eb873e235361e4fcfa7567
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the numerical problem in log_softmax cpu code when inputs are big but their differences are small.