How to properly add new submodules during training #13098
Unanswered
OlfwayAdbayIgbay
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.
-
I am currently running a module which grows during training.
Every X epochs, it grows by another submodule, and all the previous parameters are detached.
The challenges with this were as follows:
Reloading the optimizer for the new parameters:
and expanding by another module:
Now I mainly have problems with this last part. The
.double()
and.cuda(0)
calls are suboptimal and should be done via the trainer, because I also want to use things like distributed data parallel as well as experimenting with precision.Is there a way to do this "properly"? Any methods the trainer has that could do this for me?
Beta Was this translation helpful? Give feedback.
All reactions