Batch loader with custom indices

how to load batches of data with specific indices as input with mapstyle dataset?

Assuming this post is related to this cross-post:
if you want to specify the batch indices manually, you could write a custom sampler, compute the indices beforehand, and pass them to the sampler.
Alternatively, using a Subset with the desired indices as its input and disabling shuffling might also work.