onnx:Resize in opset 11 to support Pytorch‘s behavior
报错内容:
D:\Anaconda3\lib\site-packages\torch\onnx\symbolic_helper.py:243: UserWarning: You are trying to export the model with onnx:Upsample for ONNX opset version 9. This operator might cause results to not match the expected results by PyTorch.
ONNX's Upsample/Resize operator did not match Pytorch's Interpolation until opset 11. Attributes to determine how to transform the input were added in onnx:Resize in opset 11 to support Pytorch's behavior (like coordinate_transformation_mode and nearest_mode).
We recommend using opset 11 and above for models using this operator.
"" + str(_export_onnx_opset_version) + ". "
上采样引起的:
-
up3 = F.interpolate(output3_, size=[output2_.size(2), output2_.size(3)], mode="nearest")
-
output2 = output2_ + up3
-
output2 = self.merge2(output2)
-
-
up2 = F.interpolate(output2, size&#
文章来源: blog.csdn.net,作者:网奇,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/jacke121/article/details/115332714
- 点赞
- 收藏
- 关注作者
评论(0)