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

No schema registered for 'Acosh'!

Open lutianfei opened this issue 6 years ago • 7 comments

tf-gpu:1.5.0 python:3.6.0 onnx:1.4.1 onnx-tf:1.2.1

I'm sorry that I can't offer the model。 the code is as follow:

with tf.gfile.GFile("yolo_0119_final.pb", "rb") as f:
        graph_def = tf.GraphDef()
        graph_def.ParseFromString(f.read())
        onnx_model = tensorflow_graph_to_onnx_model(graph_def,
                                         "conv2d_59/BiasAdd",
                                         opset=8)

        file = open("yolo_0119_final.onnx", "wb")
        file.write(onnx_model.SerializeToString())
        file.close()
print(onnx_model.graph.node[0])

the error is as follow:

Traceback (most recent call last): File "tf_to_onnx.py", line 41, in main1() File "tf_to_onnx.py", line 35, in main1 output,opset=8) # convert tf graph to onnx model File "/root/anaconda2/envs/py3_tf15/lib/python3.6/site-packages/onnx_tf-1.2.1-py3.6.egg/onnx_tf/frontend.py", line 145, in tensorflow_graph_to_onnx_model ignore_unimplemented, optimizer_passes) File "/root/anaconda2/envs/py3_tf15/lib/python3.6/site-packages/onnx_tf-1.2.1-py3.6.egg/onnx_tf/frontend.py", line 158, in _make_onnx_model ignore_unimplemented) File "/root/anaconda2/envs/py3_tf15/lib/python3.6/site-packages/onnx_tf-1.2.1-py3.6.egg/onnx_tf/frontend.py", line 63, in tensorflow_graph_to_onnx_graph handlers = get_all_frontend_handlers(opset_dict) File "/root/anaconda2/envs/py3_tf15/lib/python3.6/site-packages/onnx_tf-1.2.1-py3.6.egg/onnx_tf/common/handler_helper.py", line 30, in get_all_frontend_handlers max_inclusive_version=version).since_version RuntimeError: No schema registered for 'Acosh'!

lutianfei avatar Feb 19 '19 01:02 lutianfei

@lutianfei Try to remove opset=8.

fumihwh avatar Feb 19 '19 03:02 fumihwh

I have similar issue and removing opset=8 lead to the following error: NotImplementedError: Maximum version 8 is not implemented

1.4.1
ONNX-TF version:
1.2.1
Tensorflow version:
1.12.0```

dingzeyuli avatar Mar 21 '19 22:03 dingzeyuli

@dingzeyuli please install onnx-tf from source.

tjingrant avatar Mar 22 '19 20:03 tjingrant

I have the same problem but removing opset=8 is not an option for me because I am trying to create ONNX models to test another application (also testing the compatibility with older opset versions and robustness/error handling with unsupported models).

I will probably switch to another way to create my test models but I am wondering why there is an option to set the opset version when it doesn't work.

HedgehogCode avatar Mar 26 '19 10:03 HedgehogCode

I have the same problem of getting error " No schema registered for Acos" even I tried to install onnx-tf from the source. When I removed the 'opset = 6' from my code, another error " Unsupported Tensorflow attribute:" appeared. Any suggestion to me to resolve that problem? Thank you

image

Varusnguyen avatar May 03 '19 01:05 Varusnguyen

has anyone resolved this?

I am running into the same problem. tensorflow==2.4.1 onnx==1.8.1
onnx-tf ==1.7.0
Python==3.7.9

Schmidtbit avatar Apr 06 '21 21:04 Schmidtbit

tensorflow_graph_to_onnx_model is no longer an API in ONNX-TF. If you see the same problem, please include the code snippet and the onnx file for investigation. Thanks!

chinhuang007 avatar Apr 07 '21 15:04 chinhuang007