Asymmetric Loss - #178
Open
tibrinkmann wants to merge 3 commits into
Open
Conversation
Collaborator
|
Thanks for the PR. I adjusted the torch grad handling. In your implementation (and the original implementation), the gradient gets disabled and enabled globally. This means that if someone has disabled grad calculation outside of the ASL function, that will be overwritten. With the context, this doesn't happen. Also, for some reason, the single-label variant doesn't use the disable-grad flag. I don't see why. @tibrinkmann did you test the ASL with and / or without the disabled gradient? That seems to be quite an important difference. Also, is there any reason not to use the optimized version? |
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.
ASL implementation and config file. Default values from original paper/implementation.
Best parameters in experiments: gamma_pos = gamma_neg = 0 and clip = 0.15