跳转至主要内容
支持知识库

遇到“TypeError: 无法直接创建描述符”。在深度学习工作台 2022.1 中导入模型时

内容类型: 错误讯息   |   文章 ID: 000091282   |   上次审核日期: 2023 年 11 月 16 日

说明

在 DL Workbench 2022.1 中转换模型时遇到错误:

TypeError: Descriptors cannot not be created directly.

If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.

If you cannot immediately regenerate your protos, some other possible workarounds are:

1. Downgrade the protobuf package to 3.20.x or lower.

2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

解决方法

据报道,protobuf 版本 4.21.0 破坏了包括 TensorFlow 库在内的多个库,需要限制为较低版本。

相关产品

本文适用于 3 产品。
英特尔® 至强融核™ 处理器软件 OpenVINO™ 工具包 性能函数库

免责声明

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