ptrblck:

torchvsion.transforms.FiveCrop


Thank you for your response, @ptrblck.
To make sure that I understand it properly, you mean replacing
transform_train = transforms.Compose([
            transforms.RandomCrop(32, padding=4),        
            transforms.RandomRotation(15),              
            transforms.RandomHorizontalFlip(),           
            transforms.ToTensor(),                     
            normalize_transform,                          
        ])

with
transform_train = transforms.Compose([
            transforms.FiveCrop (40),
            transforms.Lambda(lambda crops: torch.stack([ToTensor()(crop) for crop in crops])) 
            transforms.RandomRotation(15),              
            transforms.RandomHorizontalFlip(),           
            normalize_transform,                          
        ])

and model(input) in training procedure should be changed to:
result = model(input.view(-1, c=3, h=40, w=40)) # fuse batch size and ncrops
result_avg = result.view(bs=128, ncrops=5, -1).mean(1) # avg over crops

and the result_avg will be used for calculating loss function, prediction?
This generates extra data to train in different locations, and the size should be increased for that (let say from 32 to 40) to see some difference?