PyTorch Forums
How to get a batch with equal number of images of each class?
vision
ptrblck
March 6, 2018, 12:59pm
2
You could use the
WeightedRandomSampler
.
The issue was also discussed in
this thread
.
1 Like
show post in topic