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 slope == 0 case into standard leaky relu nn test #37559
Conversation
[ghstack-poisoned]
ghstack-source-id: aee295322eeffe70d56eff37e1aabab1ddd502aa Pull Request resolved: #37559
💊 Build failures summary and remediationsAs of commit 7ccc8ba (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 2 times. |
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 for the PR.
The new test looks good !
@@ -5635,11 +5635,6 @@ def test_leaky_relu_inplace_with_zero_or_neg_slope(self, device): | |||
with self.assertRaisesRegex(RuntimeError, "call out-of-place version"): | |||
b.backward(torch.ones(2, device=device)) | |||
|
|||
a = torch.tensor([-2., 0., 2.], device=device, requires_grad=True) |
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.
I think this is worth keeping!
We do rely on this subgradient being 0. Even though we most likely will never willingly change that. It is good to have a test that makes sure it does not happen by mistake.
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.
sure. I will make a separate test to test this.
Differential Revision: [D21319922](https://our.internmc.facebook.com/intern/diff/D21319922) [ghstack-poisoned]
ghstack-source-id: d7b20a65968c320da2d4de1e76d1578bf06d4eea Pull Request resolved: #37559
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!
@glaringlee merged this pull request in 0692804. |
Summary: Pull Request resolved: #37559 Test Plan: Imported from OSS Differential Revision: D21319922 Pulled By: glaringlee fbshipit-source-id: 212ef8e9d0f0d55a312d282693cd5990e0376c6a
Stack from ghstack:
Differential Revision: D21319922