ufoym / imbalanced-dataset-sampler

A (PyTorch) imbalanced dataset sampler for oversampling low frequent classes and undersampling high frequent ones.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should apply dataset.target_transform

tayden opened this issue · comments

In the sampler, when getting the labels of the dataset and counting the frequencies of each, the dataset target transform should be applied. Target transforms sometimes change the label (e.g. by grouping multiple of the original classes) and might affect the frequency counts for each label.