You could assume this, if you use the described setup.
However, you could e.g. specify replacement=False
, which will return unique num_samples
.
The over/undersampling also depends on the specified weights
, i.e. the WeightedRandomSampler
does not automatically produce equal class distributions in each batch, but you are free to specify the weights you need.