The class of transforms should be a arguments passed to your custom Dataset.
Then in the func of getitem(), you should apply transforms to each image.
see tutorials here: https://pytorch.org/tutorials/beginner/data_loading_tutorial.html#dataset-class 29