onnx-tensorflow
onnx-tensorflow copied to clipboard
.export_graph takes forever
Describe the bug
While trying to convert a small ~90 MB ONNX model to TensorFlow, it takes forever on some models.
To Reproduce
onnx_model = onnx.load(model_onnx)
onnx.checker.check_model(onnx_model)
tf_rep = prepare(onnx_model)
tf_rep.export_graph("saved_model")
It seems to have been stuck on
ONNX model file
https://drive.google.com/file/d/19hL2naOt0NfmopS2yX_cn_VYgR19nbqd/view?usp=sharing
Python, ONNX, ONNX-TF, Tensorflow version
This section can be obtained by running get_version.py from util folder.
- Python version: 3.7
- ONNX version: 1.10.1
- ONNX-TF version: 1.9.0
- Tensorflow version: 2.6
It is quite interesting that:
- using opset 9 instead of 10 to generate the ONNX model
- And using
onnx-tf convertinstead of programmatically converting
does seem to work, this model still takes ~30 min whereas it takes lot less time to convert other larger models.