forked from pytorch/captum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix require grad warning for non-leaf tensor in noise tunnel (pytorch…
…#426) Summary: This will fix the warning error specifically related to NoiseTunnel in pytorch#421. In addition to that I moved almost everything under no_grad in the attribute method. This will hopefully also help with runtime performance. In the `_forward_layer_eval ` I had to add `grad_enabled ` flag in order to allow to enable the gradients externally. As it is also needed in `test_neuron_gradient.py` test case. Pull Request resolved: pytorch#426 Reviewed By: vivekmig Differential Revision: D22500566 Pulled By: NarineK fbshipit-source-id: d3170e1711012593ff421b964a02e54532a95b13
- Loading branch information
1 parent
d80e857
commit e5ea6fd
Showing
4 changed files
with
96 additions
and
80 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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