Created
May 22, 2024 20:39
-
-
Save Eeman1113/9c27ad8dc891c90927a8cacf5ca89ce8 to your computer and use it in GitHub Desktop.
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
def zero_grad(self): | |
self.grad = None | |
def detach(self): | |
self.grad = None | |
self.grad_fn = None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment