Hey @xyus,
This code is an example to handle imbalanced datasets at the loader level. As is it doesn't support multi-label imbalanced datasets, but what is the actual problem you are trying to solve?
For instance, you can use loss weights and multiply each class loss as described in https://discuss.pytorch.org/t/multi-label-multi-class-class-imbalance/37573/9.
Or, taking into account all labels probabilities when calculating the weights per sample for the loader.
Hey @xyus, This code is an example to handle imbalanced datasets at the loader level. As is it doesn't support multi-label imbalanced datasets, but what is the actual problem you are trying to solve? For instance, you can use loss weights and multiply each class loss as described in https://discuss.pytorch.org/t/multi-label-multi-class-class-imbalance/37573/9. Or, taking into account all labels probabilities when calculating the weights per sample for the loader.