Diagnosing a PyTorch DataLoader Bottleneck in a Real Training Run

A ResNet-18 run wasted 43% of its GPU time on data loading. A three-line DataLoader change (num_workers, pin_memory, persistent_workers)…