How does LightningLite handle the grad scaler state dict of torch.amp? #10727
Answered
by
tchaton
hiyyg
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
Is the grad scaler included in the If not, how can I save and load the state of the grad scaler for resume? |
Beta Was this translation helpful? Give feedback.
Answered by
tchaton
Nov 24, 2021
Replies: 1 comment 1 reply
-
Hey @hiyyg. You can access the scale through the precision plugin as follows: self._precision_plugin.scaler I believe you could get the state and reload it manually. Best, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hiyyg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @hiyyg.
You can access the scale through the precision plugin as follows:
I believe you could get the state and reload it manually.
Best,
T.C