Thank you for your reply,
according to your hints I check the size of image before interpolate is (1,3,W,H), and the output feature size is (1,3,512,512), it looks the same on the pytorch side.
Also, when I use torch.jit.trace and save to conver pytoch model to libtorch model which has F.interpolate in the model, the wrong result comes up again,I couldn’t solve it at all, because all model layers are compressed into a single file.
I suspect if there’s some problem with the interpolate function but I am not able to find the problem in the source code.
When I went back to 1.4.0, all the errors were gone and everything was back to normal using the same code.