Sorry for forgetting that.
I think you could have a try on torch.randperm() 28 with fixed torch.manual_seed() and torch.multinomial() 6 with sampling probability.
torch.manual_seed(1)
random_indices = torch.randperm(num_samples)
# it will return random permutation from 0 to num_samples-1