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

When will the slice op of Onnx be supported?

li__peng
Beginner
429 Views
I tried to convert my Onnx model file into IR model, but there happens the ERROR. I looked up the supported op for Onnx, find slice op is supported in others but Onnx. C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer>python mo.py --input_model Refinedet_Anysize.onnx Model Optimizer arguments: Common parameters: - Path to the Input Model: C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\Refinedet_Anysize.onnx - Path for generated IR: C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\. - IR output name: Refinedet_Anysize - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: Not specified, inherited from the model - Output layers: Not specified, inherited from the model - Input shapes: Not specified, inherited from the model - Mean values: Not specified - Scale values: Not specified - Scale factor: Not specified - Precision of IR: FP32 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: False - Reverse input channels: False ONNX specific parameters: Model Optimizer version: 2019.1.1-83-g28dfbfd [ 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 ()": After re-inference of 1595 node, old and new shapes do not match. Old shapes: [array([ 1, 16128, 2])], new shapes: [array([ 1, 16128, 4], dtype=int64)]. [ ERROR ] Traceback (most recent call last): File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 167, in apply_replacements replacer.find_and_replace_pattern(graph) File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\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 "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\mo\middle\pattern_match.py", line 95, in apply_pattern action(graph, match) File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\extensions\middle\SliceConverter.py", line 100, in replace_pattern ss.create_node_with_data(inputs=[input, begin_node, end_node], data_nodes=[output_data]) File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\mo\ops\op.py", line 213, in create_node_with_data [data_node.shape for data_node in data_nodes]) AssertionError: After re-inference of 1595 node, old and new shapes do not match. Old shapes: [array([ 1, 16128, 2])], new shapes: [array([ 1, 16128, 4], dtype=int64)]. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\mo\main.py", line 312, in main return driver(argv) File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\mo\main.py", line 289, in driver ret_res = mo_onnx.driver(argv, argv.input_model, model_name, argv.output_dir) File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\mo\pipeline\onnx.py", line 87, in driver class_registration.apply_replacements(graph, class_registration.ClassType.MIDDLE_REPLACER) File "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 190, in apply_replacements )) from err Exception: Exception occurred during running replacer "REPLACEMENT_ID ()": After re-inference of 1595 node, old and new shapes do not match. Old shapes: [array([ 1, 16128, 2])], new shapes: [array([ 1, 16128, 4], dtype=int64)]. [ ERROR ] ---------------- END OF BUG REPORT -------------- [ ERROR ] -------------------------------------------------
0 Kudos
3 Replies
Shubha_R_Intel
Employee
429 Views

Dear li, peng,

OpenVino 2019R2 was just released yesterday. Can you kindly give it a try ? Does the problem still happen on R2 ?

Thanks,

Shubha

 

0 Kudos
li__peng
Beginner
429 Views
yes, Thanks to you for the great jobs and replys to my questions.
0 Kudos
Shubha_R_Intel
Employee
429 Views

Dear li, peng

Though OpenVino 2019R2 has been released the documentation is lagging a week behind. It should be fully updated in a week or so. But I checked in our R2 code and I saw this :

C:\Program Files (x86)\IntelSWTools\openvino_2019.2.242\deployment_tools\model_optimizer\extensions\front\onnx\slice_ext.py 

Which definitely leads me to believe that the slice op is supported by Model Optimizer ONNX. Have you tried R2 yet ?

Thanks kindly,

Shubha

0 Kudos
Reply