Are we able to construct the model after DDP is initialized? #13644
Answered
by
MultiPath
MultiPath
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
The current PL's logic seems to only ask people to first define and model, and then send it to the Trainer which automatically handles multi-gpus. However, right now I have a custom model which needs to be initialized on each GPUs. It means that I need to define the model after DDP is initialized on each GPU. Is there any way I can handle this in pytorch-lighting? |
Beta Was this translation helpful? Give feedback.
Answered by
MultiPath
Jul 13, 2022
Replies: 1 comment
-
https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#setup |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MultiPath
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#setup