Clarification on reload_dataloaders_every_epoch #12023
-
With a basic Datamodule like:
Does the flag reload_dataloaders_every_n_epochs=N cause data.setup() to be called every reload. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
no, it doesn't call setup at every reload, just the corresponding |
Beta Was this translation helpful? Give feedback.
-
Could you expand on this? Does this mean I have to use a LightningDataModule? |
Beta Was this translation helpful? Give feedback.
no, it doesn't call setup at every reload, just the corresponding
_dataloader
hook. You can define the datasets in setup and access them inside dataloader_hooks or can initialize the corresponding dataset inside dataloader_hook as well.