Thank you so much. It works for me. I have a question if you could help me more. Following the tutorial https://pytorch.org/tutorials/beginner/data_loading_tutorial.html 27 I apply the transformation in Dataset.__getitem__ method. I have a doubt. For each epoch the dataset contains always the same transformed samples? or for each epoch the samples in the dataset are transformed randomly and therefore the dataset is different for each epoch?