Thank you @ptrblck for your response.
In my code above, I’ve already used the stratify option of the method train_test_split. So my Train and Test are both well balanced.
After that, I used SubsetRandomSampler based on these well balanced indexes.
I’m struggling on how to add WeightedRandomSampler on top of SubsetRandomSampler. Thank you for your help.
As you can see, all my data are initially in the dataset placeholder, which I have to evenly split for overfit monitoring, my issue is that I don’t know how to do WeightedRandomSampler on Train dataset only.
Thank you very much,
Habib