I am working on a project where I aim to train a PyTorch model on multiple GPUs. My input data is stored in separate files for each training example, and during preprocessing, I save them using the
Код: Выделить всё
torch.saveMy question is: Should I save CUDA tensors already and just use num_workers=0, or should I store CPU tensors, set num_workers > 0, and then move the batch as a whole to GPU?
I'm uncertain which approach would be more efficient for training on multiple GPUs. Any insights or best practices on this matter would be greatly appreciated.
Источник: https://stackoverflow.com/questions/781 ... dataloader