DataLoader - using SubsetRandomSampler and WeightedRandomSampler at the same time

The code snippet looks correct, but if your DataLoader is not returning approx. balanced batches, you could refer to this example and compare the implementations.