I could replicate the issue with two extreme cases (artificial):

epoch of 10000 samples
epoch of 1 sample

-> 1. has 4 times higher bitrate when loading my data, which confirms the suspected issue.
That’s exactly what I came up with aswell  (first case)
I agree with your statement, that this is probably en edge case. However, I would expect torch.utils.data.DataLoader to be an infinite iterator. I therefore think seamless batch loading should be implemented natively because: in any case, if you learn over more than 1 epoch, there’s an inherent unnecessary downtime (which is probably not expected by the users). If you learn over rather small epochs, this downtime can lead to significant lower GPU utilization, wasting precious processing time. Do you think this could be an easy fix in torch.utils.data.DataLoader?