tensorflow-onnx
tensorflow-onnx copied to clipboard
ValueError: Input 2 of node StatefulPartitionedCall was passed float from stem_conv/kernel:0 incompatible with expected resource.
Describe the bug Hey, I am trying to convert the model from EfficientPose repo into onnx. /usr/lib/python3.7/runpy.py:125: RuntimeWarning: 'tf2onnx.convert' found in sys.modules after import of package 'tf2onnx', but prior to execution of 'tf2onnx.convert'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf2onnx/verbose_logging.py:76: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.
2022-02-15 14:48:26,386 - WARNING - From /usr/local/lib/python3.7/dist-packages/tf2onnx/verbose_logging.py:76: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.
2022-02-15 14:48:26,647 - WARNING - '--tag' not specified for saved_model. Using --tag serve 2022-02-15 14:48:26,647 - WARNING - '--signature_def' not provided. Using all signatures. Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/importer.py", line 501, in _import_graph_def_internal graph._c_graph, serialized, options) # pylint: disable=protected-access tensorflow.python.framework.errors_impl.InvalidArgumentError: Input 2 of node StatefulPartitionedCall was passed float from stem_conv/kernel:0 incompatible with expected resource.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/dist-packages/tf2onnx/convert.py", line 633, in
Urgency
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 18.04*):
- TensorFlow Version:
- Python version:
- ONNX version (if applicable, e.g. 1.11*):
- ONNXRuntime version (if applicable, e.g. 1.11*):
To Reproduce
Screenshots
Additional context
According to the exception, this is most likely a bug of TensorFlow.
From the stack trace, the error happened at:
if not kwargs.get("tflite_path") and not kwargs.get("tfjs_path"):
tf.import_graph_def(frozen_graph, name='')
_(File "/usr/local/lib/python3.7/dist-packages/tf2onnx/convert.py", line 161, in convert_common tf.import_graph_def(frozen_graph, name=''))
import_graph_def() is actually a TensorFlow function which helps to import a frozen graph from the checkpoint. So please raise this issue in TensorFlow repo. Thanks.