Created
January 9, 2021 11:14
-
-
Save sadimanna/3f9ee1da0f435c1bb28dbe2e2e018f2a to your computer and use it in GitHub Desktop.
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
| def forward_pre_hook(self,layer_name): | |
| def pre_hook(module, input): | |
| return torch.zeros(input[0].shape,dtype=torch.float,device='cuda:0',requires_grad = True) | |
| return pre_hook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment