If anyone have interest, I have done it by using:
sampler = torch.utils.data.SubsetRandomSampler(indices=index_you_want_to_use)
and then defining a new DataLoader with this sampler. I am sure there is a much better way to do that but it works. Personally I don’t like this method because it shuffle the dataset so you have to take care with the new indexes.