As the question states, I am looking for a way to do this:
rnd = sorted(random.sample(range(0, 10000), 1000))
I cannot find any implementation of random that can achieve this looking at: https://pytorch.org/docs/stable/torch.html#random-sampling 3
This is my best bet: torch.randperm(10000)[:1000] which isn’t as efficient as it could be, since I generate way more numbers than what I need