Solved by Shisho_Sama in post #2 
              
              
                OK, looks like, the WeightedRandomSampler is correctly set up as the distribution of labels in each batch is considerably more balanced than before : 
Before using the WeightedRandomSampler: 
 [BeforeWeightedRandomSampler] 
After using WeightedRandomSampler: 
[AfterWeightedRandomSampler] 
The whole …