Hi, I think your time_tot reflects the amount of time it needs to process an epoch. I don’t know how meters work but the last timing  'time_tot'=t5-t0  is measuring the amount of time you need to process an epoch as t0 is outside the for loop.

Yeah the time_tot is the full time for an epoch, while time_data is only the average time for a batch, but in the timings I gave earlier I just manually multiplied the time_data with the number of batches (6 batches), so the numbers should be comparable.

I find it’s difficult to measure the time it takes to load the data but it’s probably really low. Realize you are reading RAM. It may happen (just an hypotesis) that using workers slows dataloading as you are not preprocessing and starting them runs a big bunch of code.

That could be one explanation, can you just straight up disable the workers though? It turns out you can, and as soon as I set the number of workers to 0, the code jumped dramatically in speed, now the code is all time_data!