Solved by alex.veuthey in post #2 
              
              
                You’re close to the solution! Since the sampler gives indices for the whole epoch, you can disable shuffling in the DataLoader and decide on the indices you want in advance. By knowing the batch size, you can then know every index in every batch.