Why is it called WeightedRandomSampler if shuffle is False

Hi all,

For a project I’m working on I need to load my images randomly as well as weighted. In other words I need batch 1 must be composed of various classes.

Is there a way to do this?

The WeightedRandomSampler will use its weights to randomly sample from your dataset, so shuffling won’t do anything.
Also, have a look at this topic for more discussion.