RaLo4:

It is oftentimes run on multiple GPUs but you can still run it on only one GPU, you just need a small enough batch size.
Because there is always just one batch at a times being put onto the GPU instead of all images, the total amount of images in the dataset does not matter.
Just use any form of dataloader, like the one I showed you above, with a small enough batch size and it should work.


Thing is this dataset is a customed dataset. I wrote a dataloader for it (not Pytorch DataLoader), but I think maybe it’s the problem with that I load all the dataset in init function.