What is the purpose of reload_dataloaders_every_epoch? #7372
-
I'm looking to train on chunks of my entire dataset at a time per epoch (preferably over every n epochs, but this is not yet implemented officially), since the size of my dataset exceeds my total RAM. I'd therefore like to update the data in the DataLoaders every epoch. From all the examples I've seen, the actual data content is saved in memory a class attribute (in the following code snippet, it's saved in From my understanding,
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That's not unusual. Often datasets don't fit into the RAM and that's fine. DataLoaders are designed to asynchronously load the data from your hard disk into ram and then onto the GPU.
Yes but first of all this is a toy example and doesn't really do anything interesting. Second even though the dataset does not change, the dataloader will be constructed newly every epoch. You could return dataloader with a new or growing dataset every epoch or do something crazy like increase the batch size every epoch or turn shuffle on and off haha. |
Beta Was this translation helpful? Give feedback.
That's not unusual. Often datasets don't fit into the RAM and that's fine. DataLoaders are designed to asynchronously load the data from your hard disk into ram and then onto the GPU.
Yes but first of all this is a toy example and doesn't really do anything interesting. Second even though the dataset does not change, the dataloader will be constructed newly every epoch. You could return dataloader with a new…