文章 ID: 000088875 内容类型: 故障排除 上次审核日期: 2022 年 05 月 20 日

无法使用 OpenVINO™ 2020.4.582 将自定义 TensorFlow* 2 模型转换为中间表示 (IR)

环境

OpenVINO 2020.4.582,TensorFlow 2.6.0

BUILT IN - ARTICLE INTRO SECOND COMPONENT
总结

受 TensorFlow 2.0 对象检测 API 模型支持的OpenVINO版本。

说明
  • 转换自定义 TensorFlow 2 模型 mask_rcnn_inception_resnet_v2_1024x1024_coco17 要 IR 使用模型优化器命令:
     
    注意上面的链接可能无法正确下载文件。复制(右键单击和复制链接地址)并直接将该链接粘贴到浏览器中以打开文件可能很有必要。

    "Exception: Exception occurred during running replacer "REPLACEMENT_ID ()": 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

  • 收到错误:

    "Exception: Exception occurred during running replacer "REPLACEMENT_ID ()": The function 'update_custom_layer_attributes' must be implemented in the sub-class."

解决方法

对 TensorFlow 2.0 对象检测 API 模型的支持仅从 2021.3 OpenVINO起才得以完全启用。

升级 到 OpenVINO 2021.3 或更高版本。

相关产品

本文适用于 2 产品

本页面上的内容是原始英文内容的人工翻译与计算机翻译的组合。我们提供此内容是为了您的便利并且仅供参考,未必完整或准确。如果本页面的英文版与翻译版之间存在任何冲突,应以英文版为准。 查看此页面的英语版本。