Hello guys, I would like to select mini-batches randomly using DataLoader where each mini-batches keep holding the same item. Can I do this via DataLoader or do I just have to manually iter dataset? Although it’s possible to use just manual iteration, I just wonder about this since I still want to exploit the fancy features provided by DataLoader(e.g., collate_fn, pin_memory, num_workers…)
For example, suppose there is a dataset with item indices from 1 to n,  chronologically sorted.
If the mini-batch size is k, then I want the dataset is divided into (1 ~ k), (k+1 ~ 2k), (2k+1 ~ 3k), …, where each mini-batch is randomly selected for every epoch, but never changes the items inside the mini-batch.