Running training_step of submodules #12416
Unanswered
pchalasani
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 have a LightningModule M which contains module A and module B as sub-modules.
A,B are instantiations of the same model-type (via the same params), and this model-type has a complex
training_step
fn.In the main module M I have a
training_step
that does something like:And I do something similar with
validation_step
.This is a highly simplified description, but in my setting I am seeing signs that the two
training_step
invocations on the submodules are not independent, and the mdl_B training_step(...) is somehow influenced by the earlier call to mdl_A.training_step(...).Is there some best practice I should be aware of when trying to do something like that above?
Beta Was this translation helpful? Give feedback.
All reactions