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

Keras tiny Yolo V3 model conversion to IR failed


I've done a tiny yolo implementation using Keras with Tensorflow as backend. Firstly, I save the trained model to .h5, then convert it to .pb. Its the same ops and outputs than the project used with the examples of YOLOv3 in the OpenVINO web. So, when I try to use the I get this error.

[ 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.ConvertGroupedStridedSlice.ConvertGroupedStridedSlice'>)": list index out of range
[ ERROR ]  Traceback (most recent call last):
  File "/opt/intel/openvino_2019.1.133/deployment_tools/model_optimizer/mo/utils/", line 167, in apply_replacements
  File "/opt/intel/openvino_2019.1.133/deployment_tools/model_optimizer/extensions/middle/", line 111, in find_and_replace_pattern
    prev_sd = sorted_split_dims[0]
IndexError: list index out of range

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

Traceback (most recent call last):
  File "/opt/intel/openvino_2019.1.133/deployment_tools/model_optimizer/mo/", line 312, in main
    return driver(argv)
  File "/opt/intel/openvino_2019.1.133/deployment_tools/model_optimizer/mo/", line 263, in driver
    is_binary=not argv.input_model_is_text)
  File "/opt/intel/openvino_2019.1.133/deployment_tools/model_optimizer/mo/pipeline/", line 128, in tf2nx
    class_registration.apply_replacements(graph, class_registration.ClassType.MIDDLE_REPLACER)
  File "/opt/intel/openvino_2019.1.133/deployment_tools/model_optimizer/mo/utils/", line 190, in apply_replacements
    )) from err
Exception: Exception occurred during running replacer "REPLACEMENT_ID (<class 'extensions.middle.ConvertGroupedStridedSlice.ConvertGroupedStridedSlice'>)": list index out of range

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

Exporting the model used in the examples I don't have any errors. So the error is with the StridedSlice layers that the model have. I've done some research on the Internet and I've seen that those layers are placed there because of using Keras. Is there any solution for this problem? I've attached my Debug log for more information.


0 Kudos
0 Replies