-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add test for sigmoid_focal_loss #5783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, I only had a look at the test setup.
Improve code by using torch.testing.make_tensor Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Remove unnecessary assert Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Refactor code for generating inputs and targets Co-authored-by: Philip Meier <github.pmeier@posteo.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thansk @pmeier , I have made some changes and respond on your review
The test on GPU failed on torch.half, will investigate further why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Yosua, LGTM if CI is green!
Summary: * Add test for sigmoid_focal_loss * Update test/test_ops.py Improve code by using torch.testing.make_tensor * Update test/test_ops.py Remove unnecessary assert * Update test/test_ops.py Refactor code for generating inputs and targets * Improve focal_loss test code suggested on comment by Philip * Use fuser2 to prevent fuser bug * Combine function to generate input, dont set the fuser when device is cpu * Add github issue for the fuser problem (Note: this ignores all push blocking failures!) Reviewed By: jdsgomes, NicolasHug Differential Revision: D36095694 fbshipit-source-id: 36ed7ece4188eef159fa7f84fc3ebdc346a63f2d Co-authored-by: Philip Meier <github.pmeier@posteo.de> Co-authored-by: Philip Meier <github.pmeier@posteo.de> Co-authored-by: Philip Meier <github.pmeier@posteo.de> Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Sub-task for #5688
adding test for sigmoid_focal_loss function