How does one obtain indicies from a dataloader?

In the thread you posted is a valid solution:

Here is a small example using CIFAR10 from the other thread:

8 Likes