import torch,torchvision
list(torch.utils.data.WeightedRandomSampler([0.1, 0.9, 0.4, 0.7, 3.0, 0.6]*10000000, 500, replacement=False))
takes very long to run, whereas with replacement=True
this is more or less instantaneous.
Anyone an idea why the first option takes so long?