Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Unresolved Exception

Simha__Tejas
Beginner
619 Views

I am trying to convert a tensorflow frozen graph (.pb format) into the Intermediate Representation format as required. I am using the model optimizer. I end up getting the following exception for which I can't find a solution  anywhere: 

[ ERROR ]  -------------------------------------------------
[ ERROR ]  ----------------- INTERNAL ERROR ----------------
[ ERROR ]  Unexpected exception happened.
[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID (<class 'extensions.middle.TensorIteratorMerge.TensorIteratorMerge'>)": 0
[ ERROR ]  Traceback (most recent call last):
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 287, in apply_transform
    for_graph_and_each_sub_graph_recursively(graph, replacer.find_and_replace_pattern)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/middle/pattern_match.py", line 58, in for_graph_and_each_sub_graph_recursively
    func(graph)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/replacement_pattern.py", line 29, in find_and_replace_pattern
    apply_pattern(graph, **self.pattern(), action=self.replace_pattern)  # pylint: disable=no-member
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/middle/pattern_match.py", line 95, in apply_pattern
    action(graph, match)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/extensions/middle/TensorIteratorMerge.py", line 123, in replace_pattern
    cond_data = match['condition'].out_node(0)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/graph/graph.py", line 235, in out_node
    return self.out_nodes(control_flow=control_flow)[key]
KeyError: 0

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/main.py", line 314, in main
    return driver(argv)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/main.py", line 281, in driver
    ret_res = emit_ir(prepare_ir(argv), argv)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/main.py", line 226, in prepare_ir
    graph = mo_tf.driver(argv)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/pipeline/tf.py", line 111, in driver
    class_registration.ClassType.BACK_REPLACER
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 324, in apply_replacements
    num_transforms=len(replacers_order))
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/logger.py", line 124, in wrapper
    function(*args, **kwargs)
  File "/home/tejasrsimha/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 309, in apply_transform
    )) from err
Exception: Exception occurred during running replacer "REPLACEMENT_ID (<class 'extensions.middle.TensorIteratorMerge.TensorIteratorMerge'>)": 0

[ ERROR ]  ---------------- END OF BUG REPORT --------------
[ ERROR ]  -------------------------------------------------
 

Please help. 

0 Kudos
2 Replies
SIRIGIRI_V_Intel
Employee
619 Views

Can you confirm that you are using the tensorflow supported topologies and supported layers.

Are you using Public or custom model?

What is the model optimizer command that you have used?

We recommend to use the latest OpenVINO(2020.2) version

Regards,

Ram prasad

0 Kudos
Simha__Tejas
Beginner
619 Views

Hello Ram Prasad. Thank you for the reply. 
I will check the layers being used. 
I am using the 2020.1 version.
The command that I used is as follows: python3 mo.py --input_model PATH_TO_MODEL

I have even tried to use the model optimizer script that is specific to tensorflow models: python3 mo_tf.py --input_model PATH_TO_MODEL. 
I will get back to you regarding the layers used. 
As this is a publicly available model, I didn't check to see if any custom layers have been used. 

0 Kudos
Reply