Nn.interpolate function unexpected behaviour

Just to close the discussion with a bit of info.
i tried, torchvision.resize(), torch.nn.interpolate(), PIL.Image.resize(), cv2.resize(), and tensorflow.image.resize()

torchvision.resize() and torch.nn.interpolate() return image diff of 0.
torch 1.5 and tensorflow 2.2 have a slight differetnce(image attachhed)
torch 1.8 and tensorflow 2.2 are identical -

all others are different from each other! curiously, since models tend to learn surface, they will all return slightly different benchmarks. Which is what led me to look at this.

gist: cv2 PIL.Image torch and tensorflow have sligthly different interpolation algorithms; curious · GitHub

1 Like