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

implement gradient masking with cropping - new PR #101

Merged
merged 7 commits into from
Dec 13, 2022

Conversation

JonasHell
Copy link
Contributor

I cleaned my git repo. Unfortunately, renaming of branches leads to the closing of connected PRs. So I opened a new one. To not loose the old discussion, I link the old PR here.

@constantinpape
Copy link
Owner

Thanks @JonasHell. I will have a look soon.

Copy link
Owner

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! The changes to loss_wrapper.py all look good to me.
It would be good to extend the test cases a bit to cover all the changes:

  • In test_masking: test for both crop and multiply masking methods that the masked gradients are zero. (Can just put this in a loop where ApplyAndRemoveMask is called with the corresponding argument.) The test could also be renamed to test_ApplyAndRemove... to make the naming more consistent.
  • Add a test for MaskIgnoreLabel along the lines of test_masking.

With the extended tests this is good to go from my side.

@JonasHell
Copy link
Contributor Author

Done :)
Let me know if you want to have more tests.

Copy link
Owner

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

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

The tests look good now. Thanks!

@constantinpape constantinpape merged commit 0c5b087 into constantinpape:main Dec 13, 2022
@JonasHell JonasHell deleted the grad_masking branch December 14, 2022 08:21
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.

None yet

2 participants