I don’t know is it possible to apply transformations when i create SubsetRandomSampler , because on my code i already apply when creating data_set with code data_set = datasets.ImageFolder(data_dir,transform=train_transforms) so after getting the indices i just pass them to SubsetRandomSampler.