Solved by ptrblck in post #2 
              
              
                I think the easiest approach would be to write a custom Dataset, and load the desired samples inside of __init__. 
Since the data format is different for MNIST and CIFAR (size and number of channels), you would also need to specify some dataset-specific transformations. 
Here is a small sample code,…