I’m getting a similar issue as well! My model was working perfectly a few days ago, and I don’t think I’ve changed anything, but I’m seeing the following when I try to run the model:
/usr/lib/python3/dist-packages/PIL/ImageOps.py in expand(image, border, fill)
360     width = left + image.size[0] + right
361     height = top + image.size[1] + bottom
–> 362     out = Image.new(image.mode, (width, height), _color(fill, image.mode))
363     out.paste(image, (left, top))
364     return out
/usr/lib/python3/dist-packages/PIL/Image.py in new(mode, size, color)
2542         im.palette = ImagePalette.ImagePalette()
2543         color = im.palette.getcolor(color)
-> 2544     return im._new(core.fill(mode, size, color))
2545
2546
TypeError: must be real number, not tuple
Could this be a new bug? I’m processing .tif images and each of the images are going through the following transform:
def transform_function(degrees,scale,flip_prob):
transform_list.append(transforms.RandomAffine(degrees, scale = scale))
transform_list.append(transforms.RandomHorizontalFlip(p=flip_prob))
transform_list.append(transforms.Pad(37)) #all images should be 182x182 before padding. 
transform_list.append(transforms.ToTensor())