I know weighted sampler can solve imbalanced data problem.
However, I wonder is there a way to load exactly the same number of data per class ?
What I need now is, for example, a batch of 10 samples from class A, 10 from class B, 10 from class C, ETC…( I mean “not probablistically” but deterministically make sure to load 10 sample per class. )
I also want to know how to combine that solution with torch.utils.data.DataLoader