So you could include shuffeling of the “similar length” items and manually call that for each epoch.



 ThomasGk:

EDIT: there is something in the dataloader docs called sampler, which “defines the strategy to draw samples from the dataset”. Perhaps creating something custom related to this might offer a more ‘expected’ solution to my problem.


The Sampler is a way to do this, but so the reason I personally like datasets is that it seems more straightforward in the sense that the dataset seems to be an interface that people are used to inspecting for correctness (but of course, you can do the same by running the DL).