Thanks!
In the documentation (https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader 12) it says:


sampler  ( Sampler  2 ,  optional ) – defines the strategy to draw samples from the dataset. If specified,  shuffle  must be False.

Does that mean there would be problems if I define my training/validation set this way:
train_loader = DataLoader(dataset, batch_size=50,
             sampler=SubsetRandomSampler(train_idx), shuffle=True)
valid_loader = DataLoader(dataset, batch_size=50,
             sampler=SubsetRandomSampler(valid_idx), shuffle=True)

Why would it be an issue if I want to shuffle the data when generating batch if SubsetRandomSampler is applied?