Toybrick

标题: tensorflow 模型转换错误 OSError [打印本页]

作者: yangyin    时间: 2020-9-16 14:09
标题: tensorflow 模型转换错误 OSError
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里的 不知道为啥报错了 求解答






欢迎光临 Toybrick (http://t.rock-chips.com/) Powered by Discuz! X3.3