Split dataset into training and validation without applying training transform

You could create two different datasets (one for training and the other for validation) with different transformations. Afterwards you could sample the split indices and either use Subet of both datasets or a SubsetRandomSampler.