TensorRT 7 Resize produce inconsistent result with PyTorch Interpolate #457
Labels
bug
Something isn't working
repro requested
Request more information about reproduction of issue
triaged
Issue has been triaged by maintainers
I have an HRNet semantic segmentation model trained with Pytorch, using interpolate bilinear align_corners=True
Then I convert it for C++ inference with align_corners=True and align_corners=False, I find that the output of the two mode are almost the same.
Using PyTorch1.5, onnx build from source (almost the latest version, showed 1.7.0), set interpolate with align_corners=False, export onnx model with opset version 10.
Then I use TensorRT 7.0.0.11 for inference in Windows. I find the output is quite different from those of PyTorch, the main problem is the result is almost a shifted and smaller version than the PyTorch version.
Is writing a plugin the only way to solve this problem?
Here are the result
![torch_align_mask](https://user-images.githubusercontent.com/14209404/81463380-cf54ba80-91eb-11ea-9f9f-63e74ad0e006.png)
![torch_mask](https://user-images.githubusercontent.com/14209404/81463387-e398b780-91eb-11ea-915b-666d82773c4d.png)
![torch_diff](https://user-images.githubusercontent.com/14209404/81463412-0a56ee00-91ec-11ea-9eec-bae0c8cf39be.png)
![mask](https://user-images.githubusercontent.com/14209404/81463396-f6ab8780-91eb-11ea-880c-bd2b3cae86ca.png)
![torch_trt_no_align_diff](https://user-images.githubusercontent.com/14209404/81463408-04f9a380-91ec-11ea-9961-084e0070f146.png)
torch align
torch no align
torch diff
trt no align
trt torch diff
The text was updated successfully, but these errors were encountered: