How to get images idx=1,222,3333,55555 with a DataLoader in PyTorch?

19 Views Asked by At

From a training dataset for CIFAR100 (but this question is rather general) I want to load images with specific indexes, like for example 1, 222, 3333, 55555 (so, this would be a batch_size=4). How can I do it? Efficiency here would be cool, obviously, but currently I looking for any method.

I tried common methods, but the standard iterator getitem does not work with an array of indexes.

0

There are 0 best solutions below