标题: rknn-toolkit 1.3 转化失败 [打印本页] 作者: 奇变偶不变 时间: 2020-3-22 19:57 标题: rknn-toolkit 1.3 转化失败 =============================================
RKNN VERSION:
API: 1.3.0 (c5654ea build: 2019-12-25 12:40:55)
DRV: 1.3.0 (c4f8c23 build: 2019-11-25 10:39:29)
============================================== 报错:E Catch exception when loading tensorflow model: ./model.pb!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 189, in rknn.api.rknn_base.RKNNBase.load_tensorflow
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 527, 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/toybrick/.local/lib/python3.7/site-packages/rknn/base/RKNNlib/converter/tfruler/__init__.py", line 2, in <module>
E from .tf_ruler_generate import r_add_n_template, r_concatv2_template, r_split_template
E ImportError: cannot import name 'r_add_n_template' from 'tfruler.tf_ruler_generate' (/home/toybrick/.local/lib/python3.7/site-packages/rknn/base/RKNNlib/converter/tfruler/tf_ruler_generate.cpython-37m-aarch64-linux-gnu.so)
Load mtcnn failed! Ret = -1
code:
Load tensorflow model
print('--> Loading model')
ret = rknn.load_tensorflow(
tf_pb=pb_path,
inputs=['input'], # 注意,这里的input名字来自于模型转换时候打印出来的mode.input.op.name
outputs=['dense_2/Softmax'], # 注意,这里的output名字来自于模型转换时候打印出来的mode.output.op.name
input_size_list=[[INPUT_WIDTH, INPUT_HEIGHT, 1]])
if ret != 0:
print('Load mtcnn failed! Ret = {}'.format(ret))
exit(ret)
print('done')