add slope == 0 case into standard leaky relu nn test#37559
Closed
glaringlee wants to merge 2 commits intogh/glaringlee/17/basefrom
Closed
add slope == 0 case into standard leaky relu nn test#37559glaringlee wants to merge 2 commits intogh/glaringlee/17/basefrom
glaringlee wants to merge 2 commits intogh/glaringlee/17/basefrom
Conversation
[ghstack-poisoned]
💊 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. |
albanD
requested changes
Apr 30, 2020
Collaborator
albanD
left a comment
There was a problem hiding this comment.
Thanks for the PR.
The new test looks good !
| 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) |
Collaborator
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
sure. I will make a separate test to test this.
Differential Revision: [D21319922](https://our.internmc.facebook.com/intern/diff/D21319922) [ghstack-poisoned]
Contributor
|
@glaringlee merged this pull request in 0692804. |
gchanan
pushed a commit
that referenced
this pull request
May 5, 2020
Summary: Pull Request resolved: #37559 Test Plan: Imported from OSS Differential Revision: D21319922 Pulled By: glaringlee fbshipit-source-id: 212ef8e9d0f0d55a312d282693cd5990e0376c6a
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Pull Request resolved: pytorch#37559 Test Plan: Imported from OSS Differential Revision: D21319922 Pulled By: glaringlee fbshipit-source-id: 212ef8e9d0f0d55a312d282693cd5990e0376c6a
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.
Stack from ghstack:
Differential Revision: D21319922