Toybrick

tensorflow 模型转换错误 OSError

yangyin

新手上路

积分
40
楼主
发表于 2020-9-16 14:09:57    查看: 7223|回复: 0 | [复制链接]    打印 | 只看该作者
E Catch exception when loading tensorflow model: /home/yy/rknn/rknn-toolkit/examples/tensorflow/ssd_mobilenet_v1/ssd_mobilenet_v1_coco_2017_11_17.pb!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 222, in rknn.api.rknn_base.RKNNBase.load_tensorflow
E   File "rknn/base/RKNNlib/converter/convert_tf.py", line 530, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.pre_process
E   File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 96, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.pre_proces
E   File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 555, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.import_tf_ruler_module
E   File "/home/yy/.local/lib/python3.6/site-packages/rknn/base/RKNNlib/converter/tfruler/__init__.py", line 1, in <module>
E     from .tf_ruler_generate import gen_tf_ruler
E   File "rknn/base/RKNNlib/converter/tfruler/tf_ruler_generate.py", line 2487, in init rknn.base.RKNNlib.converter.tfruler.tf_ruler_generate
E   File "rknn/base/RKNNlib/converter/tfruler/tf_ruler_generate.py", line 11, in rknn.base.RKNNlib.converter.tfruler.tf_ruler_generate.rule_pyfunc_def._wrap_func
E   File "/home/yy/.local/lib/python3.6/site-packages/dill/source.py", line 342, in getsource
E     lines, lnum = getsourcelines(object, enclosing=enclosing)
E   File "/home/yy/.local/lib/python3.6/site-packages/dill/source.py", line 313, in getsourcelines
E     code, n = getblocks(object, lstrip=lstrip, enclosing=enclosing, locate=True)
E   File "/home/yy/.local/lib/python3.6/site-packages/dill/source.py", line 239, in getblocks
E     lines, lnum = findsource(object)
E   File "/home/yy/.local/lib/python3.6/site-packages/dill/source.py", line 133, in findsource
E     raise IOError('source code not available')
E OSError: source code not available
done
--> Building model
Traceback (most recent call last):
  File "ssd.py", line 75, in <module>
    rknn.build(do_quantization=True, dataset='./dataset.txt')
  File "/home/yy/.local/lib/python3.6/site-packages/rknn/api/rknn.py", line 231, in build
    inputs = self.rknn_base.net.get_input_layers()
AttributeError: 'NoneType' object has no attribute 'get_input_layers'

代码和模型都是https://github.com/rockchip-linux/rknn-toolkit
example/tensorflow里的 不知道为啥报错了 求解答

回复

使用道具 举报

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

本版积分规则

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


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