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.
6402 Discussions

Error While Trying to Convert my own Custom Model to (IR representation)

khadijaazhar
Beginner
1,654 Views
 

[ 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 "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 288, in apply_transform
for_graph_and_each_sub_graph_recursively(graph, replacer.find_and_replace_pattern)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/middle/pattern_match.py", line 58, in for_graph_and_each_sub_graph_recursively
func(graph)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/utils/replacement_pattern.py", line 27, in find_and_replace_pattern
apply_pattern(graph, **self.pattern(), action=self.replace_pattern) # pylint: disable=no-member
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/middle/pattern_match.py", line 95, in apply_pattern
action(graph, match)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/extensions/middle/TensorIteratorMerge.py", line 123, in replace_pattern
cond_data = match['condition'].out_node(0)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/graph/graph.py", line 239, 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 "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/main.py", line 298, in main
ret_code = driver(argv)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/main.py", line 265, in driver
ret_res = emit_ir(prepare_ir(argv), argv)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/main.py", line 234, in prepare_ir
graph = unified_pipeline(argv)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/pipeline/unified.py", line 29, in unified_pipeline
class_registration.ClassType.BACK_REPLACER
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 334, in apply_replacements
apply_replacements_list(graph, replacers_order)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 324, in apply_replacements_list
num_transforms=len(replacers_order))
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/utils/logger.py", line 124, in wrapper
function(*args, **kwargs)
File "/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 312, 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 ] -------------------------------------------------

0 Kudos
11 Replies
Iffa_Intel
Moderator
1,642 Views

Greetings,


Could you clarify your:

  1. Model (ONNX, Tensorflow,etc)
  2. OS (ubuntu 18.04 etc)
  3. OpenVINO version ( I believe you are using 2021.1)
  4. Were you able to run the example after the setup as in here
  5. Did you ensure that setupvars was initialized beforehand?


Sincerely,

Iffa



0 Kudos
khadijaazhar
Beginner
1,637 Views

1.  I have both models (onnx, Tensorflow) both are not working.

2.  OS i have Ubuntu 18.04.5 LTS.

3.  Openvino version (openvino_2021.1.110).

4.  Yes i have 3 examples running on following models .

  •    demo_security_barrier_camera.sh is running in demo folder of openvino.
  •    downloaded  ssd_mobilenet model and generated inference on my video (Optimization and inference).
  •    downloaded tensorflow-yolo-v3 (Model Optimization).

5.  Yes set up is initialized beforehand.

I have attached errors on my onnx and tensorflow model. 

When i try other than any custom model OpenVino is working fine.

0 Kudos
Iffa_Intel
Moderator
1,633 Views

Please help to refer this for Tensorflow conversion and this for ONNX.

Besides, ensure that your topology is listed there. Otherwise, it is not supported.


Sincerely,

Iffa


0 Kudos
khadijaazhar
Beginner
1,631 Views

yes for both models i am following these links.

Tried many solutions but didn't figure out why its not working

0 Kudos
Iffa_Intel
Moderator
1,622 Views

In that case, can you share your files to me so that I could replicate?


Sincerely,

Iffa


0 Kudos
khadijaazhar
Beginner
1,614 Views

how can i send you my model files .pb and .onnx  

as on this  forms these files are not supported.

 

Can you send me your email .

0 Kudos
khadijaazhar
Beginner
1,569 Views

model files are attached

0 Kudos
khadijaazhar
Beginner
1,561 Views

both model files are attached here that i have been working on

onnx and tensor flow both are not working errors are also attached.

I have tried these models on 2019 ,2020, 2021 versions but they are not working.

Thankyou for your cooperation

 

 

0 Kudos
Iffa_Intel
Moderator
1,554 Views

Hi,

I had tested your model. Since it is .onnx file, it means that this file is an ONNX model.

It seems that your model is incompatible.

I suggest you proceed with this model archive (squeezenet - supported public ONNX topology).

You may refer to my attachments and here for guidance. 

I converted the model using model optimizer (mo.py) and I ran the IR with the classification sample.

 

Sincerely,

Iffa

0 Kudos
Iffa_Intel
Moderator
1,571 Views

Hi, you can ty to zip your file and attach it



Sincerely,

Iffa


Iffa_Intel
Moderator
1,538 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question


Sincerely,

Iffa


0 Kudos
Reply