tensorflow-onnx
tensorflow-onnx copied to clipboard
Facing Error with FSRCN model conversion to onnx.
I am unable to convert FSRCN SR model into .onnx format because of below error. Can Anyone please help me with this
Use tf.compat.v1.graph_util.extract_sub_graph
Failed to convert node 'model_5/conv2d_transpose_5/BiasAdd' (fct=<bound method ConvTranspose.version_1 of <class 'tf2onnx.onnx_opset.nn.ConvTranspose'>>)
'OP=ConvTranspose\nName=model_5/conv2d_transpose_5/BiasAdd\nInputs:\n\tmodel_5/conv2d_transpose_5/stack_Concat__70:0=Concat, [4], 6\n\tmodel_5/conv2d_transpose_5/conv2d_transpose/ReadVariableOp:0=Const, [9, 9, 1, 56], 1\n\tmodel_5/conv2d_46/Relu:0=Relu, [-1, -1, -1, 56], 1\n\tmodel_5/conv2d_transpose_5/BiasAdd/ReadVariableOp:0=Const, [1], 1\nOutpus:\n\tmodel_5/conv2d_transpose_5/BiasAdd:0=[-1, -1, -1, 1], 1'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/tf2onnx/tfonnx.py", line 292, in tensorflow_onnx_mapping
func(g, node, **kwargs, initialized_tables=initialized_tables, dequantize=dequantize)
File "/usr/local/lib/python3.7/dist-packages/tf2onnx/onnx_opset/nn.py", line 492, in version_1
utils.make_sure(ctx.opset >= 10, "Opset 10 needed for Conv Backprop Input with non-constant shape")
File "/usr/local/lib/python3.7/dist-packages/tf2onnx/utils.py", line 264, in make_sure
raise ValueError("make_sure failure: " + error_msg % args)
ValueError: make_sure failure: Opset 10 needed for Conv Backprop Input with non-constant shape
Could you please specify the opset version to 10 when you try to call the api or script?
It's been over 3 months, so closing this. Feel free to open a new one if the issue still exists.