Hi,
All classes in transforms except Normalize work on PIL images so you have put below line or similar to it before converting it to tensor using ToTensor. After these transforms call ToTensor and then Normalize.



 Hyeongu_Oh:

transforms.RandomHorizontalFlip(0.5)


Solution:
trans = transforms.Compose([transforms.ToPILImage(),
                            transforms.RandomHorizontalFlip(0.5),
                            ...
                            ...
                            transforms.ToTensor(),
                            transforms.Normalize((0.5,0.5,0.5),(0.5,0.5,0.5))])

Bests