How to implement manual gradient computation and scaling in Pytorch Lightning? #12852
Unanswered
FeryET
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment 1 reply
-
hey @FeryET !! I am not familiar with gradient penalty. Can you share some references to the PyTorch doc and gradient penalty? I can check and help you here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I'm trying to compute gradient penalty in my training loop, and from what I've read in Pytorch's documentation, gradient penalty should be computed in a context in which gradients are scaled and no kind of mixed precision acceleration is going on. How can I achieve this in pytorch lightning? From what I've read
manual_backward
is still wrapped via mixed precision accelerations.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions