I am working on an imbalanced dataset of around 5000 images with 10 classes. I have to consider each of these classes as individual binary classification tasks during the forward pass for my project. Therefore I have got weights for each task, i.e a numpy array of dimensions (10,2). May I know how to implement the weight sampler here, so that it becomes balanced for each task?
Thanks a lot in advance.