training_step
with autocast(endabled=True)
and GradScaler()
#19279
Unanswered
kapsner
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I would like to reimplement this code with
lightning
and I am not sure, how to correctly write thetraining_step
.I've implemented something like the following but I am unsure, if this is the correct way of transposing the code to the
lightning
framework:In particular, I am unsure if it would be sufficient to remove the
GradScaler()
code andautocast()
and replace it withtrainer = Trainer(precision=16)
(as suggested here), so that the code would look something like:Beta Was this translation helpful? Give feedback.
All reactions