Solved by ptrblck in post #2 
              
              
                Your custom sampler and the Subset will yield the same data samles, if you don’t use shuffle=True for the DataLoader using the Subset. 
The main difference is, that a custom sampler can do much more than just returning a subset of the data. 
E.g. the WeightedRandomSampler implements a sample weight,…