Solved by Caruso in post #2 
              
              
                Hi, 
yes if you are right, you cant add the padding. I don’t know why you want to pad and not resize in this case but here is something that should work: 
import torchvision.transforms.functional as F

class PadCenterCrop(object):
    def __init__(self, size, pad_if_needed=False, fill=0, padding_mod…