yichao_Liu:

I did so. But still can’t finish one epochs.


If you get a CUDA out of memory error when running on GPU you can try using a smaller batch size.
The 96 I used was just there as an example.



 yichao_Liu:

I’m wondering how ImageNet runs on gpu. Because 124G data can be ran on one gpu.


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.