@murali_perumalla
It is called weighted_sampling if I am not wrong. I couldn’t share my code because I didn’t have to go for the weighted sampling(that’s why put it in the last option).
You can look for the code here: How to Prevent Overfitting 134
And also in the doc: https://pytorch.org/docs/stable/data.html 37