I have onnx model converted from pytorch. I want to convert it to .pb via onnx_tf. Then i get following error:
RuntimeError: Resize coordinate_transformation_mode=pytorch_half_pixel is not supported in Tensorflow.
Looks like my problem is similair to this https://github.com/onnx/onnx-tensorflow/issues/632, but proposed solutions isnt working for me. From reading this:
lowering opset version to 9 in onnx.export
changing 'align_corners' property to True in torch.nn.Upsample while building model in pytorch
should fix the problem
pytorch model comes to me like a black box and i cant change inner structure or tensor properties. Also, model uses dynamic padding and lowering version from 11 to 9-10 leads to this error:
RuntimeError: Unsupported: ONNX export of Pad in opset 9. The sizes of the padding must be constant. Please try opset version 11.
Because of this, i dont know how to apply proposed solutions in my case.
To Reproduce
pytorch_half_pixel error occurs while executing following code (in func prepare):
Describe the bug
I have onnx model converted from pytorch. I want to convert it to .pb via onnx_tf. Then i get following error:
RuntimeError: Resize coordinate_transformation_mode=pytorch_half_pixel is not supported in Tensorflow.
Looks like my problem is similair to this https://github.com/onnx/onnx-tensorflow/issues/632, but proposed solutions isnt working for me. From reading this:pytorch model comes to me like a black box and i cant change inner structure or tensor properties. Also, model uses dynamic padding and lowering version from 11 to 9-10 leads to this error:
RuntimeError: Unsupported: ONNX export of Pad in opset 9. The sizes of the padding must be constant. Please try opset version 11.
Because of this, i dont know how to apply proposed solutions in my case.To Reproduce pytorch_half_pixel error occurs while executing following code (in func prepare):
ONNX model file https://drive.google.com/file/d/147eZku7KXDFFD_oauijQMZKZ2-UdRTtq/view?usp=sharing
Python, ONNX, ONNX-TF, Tensorflow version
How can solve this problem? Thanks in advance