Where are the tensors (model) after training via pl.Trainer? #16416
Unanswered
junpark25
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.
-
I am asking because I've got the following error when I ran the following code after training.
I checked that before training the model was on the GPU.
But after training
I found that model was on the CPU.
It seems that pl.Trainer moves the tensors (model) to the GPU during training and back to the CPU after training, if their locations are not explicitly specified. And this caused the error.
Is this normal behavior or I messed with some configuration?
My lightning model is
Beta Was this translation helpful? Give feedback.
All reactions