That is almost correct, instead of epochs it is batches (my mistake). So the memory stays the same for the first 120 batches in the first epoch after which the memory suddenly starts increasing up to 100% (12.5GB), after which Colab crashes. My total dataset is around 6GB in size, so I don’t think it is saving that into memory. Like I said earlier, I don’t know if it helps to show my custom dataloader but if it does be sure to let me know and I will post it.