onnx-tensorflow icon indicating copy to clipboard operation
onnx-tensorflow copied to clipboard

Conversion onnx-tf error

Open mdatres opened this issue 4 years ago • 1 comments

Dear all,

i'm trying to convert a .onnx model opset 12 to tensorflow. Using the onnx runtime the model works correctly, but if I try to convert it using the command:

onnx-tf convert -i retinanet2x.onnx -o retinanet.pb

the following error occurs:

ValueError: Shape must be rank 0 but is rank 1 for 'onnx_tf_prefix_If_1072/Switch' (op: 'Switch') with input shapes: [1], [1].

My environment settings are the following:

onnx 1.8.1 onnx-tf 1.7.0
onnxruntime 1.7.0 tensorflow 1.15.4 torch 1.8.0

Can you help me?

Best regards,

mdatres

mdatres avatar Mar 18 '21 10:03 mdatres

Please share the onnx model file for debugging.

chinhuang007 avatar Mar 25 '21 17:03 chinhuang007