Hi,
My question is related to loading input data using the combination of Dataset and DataLoader. Since pin_memory option in a DataLoader works for CPU tensors, I understand that there are two ways to load the input data:

In the Dataset create CPU  tensors and then using pin_memory transfer it to GPU
Directly create CUDA tensors in the Dataset and don’t use pin_memory


Which method is more efficient wrt data loading time and why? Any references would be helpful.
Thanks!