Better way to load data onto the GPU in pytorch

76 Views Asked by At

I am trying to do a comparative study across different image classification models, so I plan on training them all on the same dataset. I was wondering if there is a method in which I load the entire dataset onto the GPU once and use that to train all the models. Without having to do it for all the models using the standard image = image.to(device) every time I train a model. Because the image dataset I have is quiet huge and loading it on the GPU each time, I think is taking up alot of time.

0

There are 0 best solutions below