|
发表于 2019-7-23 16:29:20
|
显示全部楼层
我想把facenet的模型pb模型转换成rknn模型,在加载tensorflow模型时出错。
测试代码如下:
-----------------------------------------------------------------------------
from rknn.api import RKNN
INPUT_SIZE = 160
if __name__ == '__main__':
# Create RKNN object
rknn = RKNN()
# Config for Model Input PreProcess
rknn.config(channel_mean_value='128 128 128 128', reorder_channel='0 1 2')
print('config done')
#load tensorflow model
print('--> Loading model')
rknn.load_tensorflow(tf_pb='./20180402-114759.pb',
inputs=['input'],
outputs=['embeddings'],
input_size_list=[[INPUT_SIZE, INPUT_SIZE, 3]])
print('done')
出错信息是这样:
-----------------------------------------------------------------------------
pu@pu-vm:~/RKNN/demo/facenet$ python3 test1.py
config done
--> Loading model
W Not match node embeddings/Rsqrt Rsqrt
E Catch exception when loading tensorflow model: ./20180402-114759.pb!
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 185, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 589, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 488, in rknn.base.RKNNlib.converter.convert_tf.convert_tf._tf_push_ready_node
T TypeError: 'NoneType' object is not iterable
done
pu@pu-vm:~/RKNN/demo/facenet$
inputs 和 outputs 节点名字,我用tensorboard打开看,就是“input” 和 “embeddings” 。
请问是哪里出了问题呢? |
|