pin_memory=True and setting num_workers to a positive number significantly boosts performance
pin_memory
pin_memory=True
locks the data in page-locked memory, allowing the GPU to access it faster. pin_memory
pin_memory=True
locks the data in page-locked memory, allowing the GPU to access it faster.