When I am trying to use the torchvision.transforms.RandomAffine, I always got such an error:TypeError: transform() got an unexpected keyword argument ‘fillcolor’. Here is my code:
class RandomAffineTform(object):
“”“Online affine transformation on patches: randomly generated transform matrix.”""
def __call__(self, sample):
    patch1, patch2 = sample['patch1'], sample['patch2']
    patch1, patch2 = transforms.ToPILImage()(patch1), transforms.ToPILImage()(patch2)

    aff_tf = transforms.RandomAffine(degrees=5, scale=(0.9, 1.1), shear=5)

    return {'patch1': transforms.ToTensor()(aff_tf(patch1)),
            'patch2': transforms.ToTensor()(aff_tf(patch2))}

I have no idea how to debug it.