Flock1:

transform_img = transforms.Compose([
        transforms.RandomResizedCrop(224),
        transforms.RandomHorizontalFlip(),
        transforms.ToTensor(),
        transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])



You can create multiple different transform sequences, then extend self.data few more times with different augmentation flags and run different transforms depending on value of the flag.