Toybrick

rknn.load_tensorflow()出错

tf小迷弟

注册会员

积分
61
楼主
发表于 2020-12-28 15:44:02    查看: 9433|回复: 4 | [复制链接]    打印 | 只看该作者
以下为错误信息

--> load model
E Catch exception when loading tensorflow model: frozen_inference_graph.pb!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 136, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T   File "rknn/base/RKNNlib/converter/convert_tf.py", line 102, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.__init__
T   File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 37, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.__init__
T   File "rknn/base/RKNNlib/converter/tensor_util.py", line 13, in rknn.base.RKNNlib.converter.tensor_util.TensorLabelOperator.tensor_label_split
T ValueError: too many values to unpack (expected 2)
done
回复

使用道具 举报

tf小迷弟

注册会员

积分
61
沙发
 楼主| 发表于 2020-12-28 15:46:48 | 只看该作者
这是日志信息

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
    stream.write(msg)
ValueError: I/O operation on closed file.
Call stack:
  File "/home/zhao/test_rknn/test_rknn.py", line 40, in <module>
    convert_model(model_path, output_path, pre_compile)
  File "/home/zhao/test_rknn/test_rknn.py", line 23, in convert_model
    ret = rknn.load_tensorflow(tf_pb=model_path, inputs=inputs, outputs=outputs, input_size_list=input_size_list)
  File "/home/zhao/.local/lib/python3.6/site-packages/rknn/api/rknn.py", line 62, in load_tensorflow
    std_values=std_values)
  File "/home/zhao/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation_wrapper.py", line 119, in __getattr__
    _call_location(), full_name, rename)
  File "/home/zhao/.local/lib/python3.6/site-packages/tensorflow/python/platform/tf_logging.py", line 166, in warning
    get_logger().warning(msg, *args, **kwargs)
Message: 'From %s: The name %s is deprecated. Please use %s instead.\n'
Arguments: ('/home/zhao/.local/lib/python3.6/site-packages/rknn/api/rknn.py:62', 'tf.GraphDef', 'tf.compat.v1.GraphDef')
done

Process finished with exit code 0
回复

使用道具 举报

jefferyzhang

版主

积分
13574
板凳
发表于 2020-12-29 10:29:52 | 只看该作者
模型的tensorflow版本是多少
回复

使用道具 举报

tf小迷弟

注册会员

积分
61
地板
 楼主| 发表于 2020-12-29 12:00:45 | 只看该作者
jefferyzhang 发表于 2020-12-29 10:29
模型的tensorflow版本是多少

我换了1.3.0,问题解决了,不过现在开启预编译之后,会报另一个错
回复

使用道具 举报

tf小迷弟

注册会员

积分
61
5#
 楼主| 发表于 2020-12-29 12:01:57 | 只看该作者
jefferyzhang 发表于 2020-12-29 10:29
模型的tensorflow版本是多少

cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
mv: 无法获取'/home/zhao/test_rknn/*.nb' 的文件状态(stat): 没有那个文件或目录
mv: 无法获取'/home/zhao/test_rknn/*.dat' 的文件状态(stat): 没有那个文件或目录
E Generate nbg failed.
W ----------------Warning(6)----------------
E Catch exception when building RKNN model!
E Traceback (most recent call last):
E   File "rknn/base/ovxconfiggenerator.py", line 178, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
E   File "rknn/base/RKNNlib/app/exporter/ovxlib_case/casegenerator.py", line 531, in rknn.base.RKNNlib.app.exporter.ovxlib_case.casegenerator.CaseGenerator.generate
E   File "rknn/base/RKNNlib/app/exporter/ovxlib_case/casegenerator.py", line 495, in rknn.base.RKNNlib.app.exporter.ovxlib_case.casegenerator.CaseGenerator._gen_special_case
E   File "rknn/base/RKNNlib/app/exporter/ovxlib_case/casegenerator.py", line 462, in rknn.base.RKNNlib.app.exporter.ovxlib_case.casegenerator.CaseGenerator._gen_nb_file
E AttributeError: 'CaseGenerator' object has no attribute 'nbg_graph_file_path'
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 760, in rknn.api.rknn_base.RKNNBase.build
E   File "rknn/api/rknn_base.py", line 640, in rknn.api.rknn_base.RKNNBase._build
E   File "rknn/base/ovxconfiggenerator.py", line 180, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
E   File "/home/zhao/anaconda3/envs/rknn/lib/python3.6/site-packages/rknn/base/RKNNlib/RKNNlog.py", line 327, in e
E     raise ValueError(msg)

tf1.14  rknn1.3.0 主机是18.04的x64
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表