Could you try to pass the size as a tuple to Resize?
transforms.Resize((input_size, input_size))
# instead of
transforms.Resize(input_size, input_size)

The second argument should be used as the interpolation argument, and should throw an error, if you are trying to resize the input. If one side of the passed image has already the desired shape, this might be a no-op, thus now throwing the error.