Article ID: 000088875 Content Type: Troubleshooting Last Reviewed: 05/20/2022

Unable to Convert the Custom TensorFlow* 2 Model to Intermediate Representation (IR) Using OpenVINO™ 2020.4.582

Environment

OpenVINO 2020.4.582, TensorFlow 2.6.0

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Supported OpenVINO version for TensorFlow 2.0 Object Detection API models.

Description
  • Converted custom TensorFlow 2 model mask_rcnn_inception_resnet_v2_1024x1024_coco17 to IR using the Model Optimizer command:
     
    NoteThe link above may not download the file correctly. It may be necessary for you to copy (right-click and copy link address) and paste the link directly into your browser in order to open the file.

    "Exception: Exception occurred during running replacer "REPLACEMENT_ID (<class'extensions.front.tf.tensorflow_custom_operations_config_update.TensorflowCustomOperationsConfigUpdate'>)": The function 'update_custom_layer_attributes' must be implemented in the sub-class."

    python mo_tf.py

    --saved_model_dir C:\DATASETS\mask50000\exports\saved_model

    --output_dir C:\DATASETS\mask50000

    --reverse_input_channels

    --tensorflow_custom_operations_config extensions\front\tf\mask_rcnn_support_api_v2.4.json

    --tensorflow_object_detection_api_pipeline_config C:\DATASETS\mask50000\exports\pipeline.config

    --log_level=DEBUG

  • Received error:

    "Exception: Exception occurred during running replacer "REPLACEMENT_ID (<class'extensions.front.tf.tensorflow_custom_operations_config_update.TensorflowCustomOperationsConfigUpdate'>)": The function 'update_custom_layer_attributes' must be implemented in the sub-class."

Resolution

Support for TensorFlow 2.0 Object Detection API models was fully enabled only starting from OpenVINO 2021.3.

Upgrade to OpenVINO 2021.3 or later versions.

Related Products

This article applies to 2 products