ptrblck:

These numbers would represent a ~0.6% error, wouldn’t they?


Yes you are right. I guess in case one want to generate a uniform distribution over imbalanced classes with low number of samples the WeightedRandomSampler might not be the best solution (as for num_samples=100 we have a deviation of up to 5 %).
Thanks again for your help!