Skip to content
Discussion options

You must be logged in to vote

Did Lightning add a cache mechanism to load the data once?

No, the flag just means that we call LightningModule.train_dataloader() every epoch if enabled, thus creating a new DataLoader instance.

Must I use the reload_dataloader_every_epoch flag to do data augmentation or else my random transforms will only be applied once

If I understand correctly, no.
The transformations are applied directly in the Dataset, so every time an item is consumed from it, the random transforms should be applied regardless of whether the DataLoader has or hasn't been recreated.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dianemarquette
Comment options

Answer selected by dianemarquette
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment