How to loop over the entire dataset before training start #12809
Answered
by
rohitgr7
dalessioluca
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
Hello, Is there any ModelHook which allows me to perform a single pass on the entire dataset before the training start ? Thanks in advance
|
Beta Was this translation helpful? Give feedback.
Answered by
rohitgr7
Apr 20, 2022
Replies: 1 comment 1 reply
-
you can do def on_train_start(self):
for batch in self.trainer.train_dataloader.loaders:
... |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dalessioluca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can do