Performance_check

How do I calculate time spent by DataLoader vs time spent in training each epoch?

You could check the ImageNet example and reuse the data_time counter to check how long the next iteration has to wait for the next batch. Note that this approach is not profiling the DataLoader directly, since it’s preloading the next batches in the background, but could still be useful to check for a data loading bottleneck in your application.

1 Like