Skip to content

ERROR - Tensorflow op [UnravelIndex: UnravelIndex] is not supported #2019

Open
@IamNaQi

Description

@IamNaQi

Describe the bug
I am trying to convert savedModel from checkpoints of deeplabcut to onnx but getting while converting. I have tried with different opsets as well.

System information

  • windows 10
  • Tensorflow 2.7:
  • Python 3.7:

python -m tf2onnx.convert --saved-model "C:\Users\Naqi\Desktop\DLC\BlackMosue-Mouse1-2022-07-24\dlc-models\iteration-0\BlackMosueJul24-trainset95shuffle1\train\12\svdm" --output model10.onnx  --opset 10
C:\Users\Naqi\AppData\Local\Programs\Python\Python37\lib\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))
2022-08-04 16:42:40,857 - WARNING - '--tag' not specified for saved_model. Using --tag serve
2022-08-04 16:42:42,534 - INFO - Signatures found in model: [serving_default].
2022-08-04 16:42:42,534 - WARNING - '--signature_def' not specified, using first signature: serving_default
2022-08-04 16:42:42,538 - INFO - Output names: ['out']
WARNING:tensorflow:Issue encountered when serializing model_variables.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
This operation is not supported when eager execution is enabled.
2022-08-04 16:42:42,553 - WARNING - Issue encountered when serializing model_variables.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
This operation is not supported when eager execution is enabled.
WARNING:tensorflow:Issue encountered when serializing variables.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
This operation is not supported when eager execution is enabled.
2022-08-04 16:42:42,558 - WARNING - Issue encountered when serializing variables.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
This operation is not supported when eager execution is enabled.
WARNING:tensorflow:Issue encountered when serializing trainable_variables.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
This operation is not supported when eager execution is enabled.
2022-08-04 16:42:42,559 - WARNING - Issue encountered when serializing trainable_variables.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
This operation is not supported when eager execution is enabled.
WARNING:tensorflow:From C:\Users\Naqi\AppData\Local\Programs\Python\Python37\lib\site-packages\tf2onnx\tf_loader.py:711: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
2022-08-04 16:42:43,535 - WARNING - From C:\Users\Naqi\AppData\Local\Programs\Python\Python37\lib\site-packages\tf2onnx\tf_loader.py:711: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
2022-08-04 16:42:43,908 - INFO - Using tensorflow=2.7.0, onnx=1.11.0, tf2onnx=1.12.0/a58786
2022-08-04 16:42:43,908 - INFO - Using opset <onnx, 10>
2022-08-04 16:42:44,423 - INFO - Computed 2 values for constant folding
2022-08-04 16:42:44,796 - INFO - folding node using tf type=StridedSlice, name=strided_slice_3
2022-08-04 16:42:44,797 - INFO - folding node using tf type=StridedSlice, name=strided_slice_11
2022-08-04 16:42:45,150 - WARNING - Conv Backprop Input with strides > 1 and non-constant shape has known bug. Workaround requires opset 12.
2022-08-04 16:42:45,167 - WARNING - Conv Backprop Input with strides > 1 and non-constant shape has known bug. Workaround requires opset 12.
2022-08-04 16:42:45,255 - ERROR - Tensorflow op [UnravelIndex: UnravelIndex] is not supported
2022-08-04 16:42:45,727 - ERROR - Unsupported ops: Counter({'UnravelIndex': 1})
2022-08-04 16:42:45,802 - INFO - Optimizing ONNX model
2022-08-04 16:42:49,316 - INFO - After optimization: Cast -5 (71->66), Concat -3 (18->15), Const -332 (520->188), Div -1 (59->58), Gather +4 (59->63), Identity -89 (97->8), Mul -3 (9->6), Reshape -19 (27->8), Shape -3 (62->59), Size -1 (4->3), Slice -11 (34->23), Squeeze -11 (72->61), Transpose -227 (233->6), Unsqueeze -15 (20->5)
2022-08-04 16:42:49,383 - INFO -
2022-08-04 16:42:49,383 - INFO - Successfully converted TensorFlow model C:\Users\Naqi\Desktop\DLC\BlackMosue-Mouse1-2022-07-24\dlc-models\iteration-0\BlackMosueJul24-trainset95shuffle1\train\12\svdm to ONNX
2022-08-04 16:42:49,387 - INFO - Model inputs: ['in']
2022-08-04 16:42:49,388 - INFO - Model outputs: ['out']
2022-08-04 16:42:49,388 - INFO - ONNX model is saved at model10.onnx

Metadata

Metadata

Assignees

No one assigned

    Labels

    unsupported opsIssues related to unsupported operators

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions