You could create different transformations for the corresponding datasets and use a SubsetRandomSampler to split the data according to the indices. @kevinzakka created a good example for CIFAR10 here 1.1k.