我建立一個pb,希望可以轉成rknn,但是在load_tensorflow 便失敗了。
這個pb 有用過Tensorflow for Android上執行是沒有問題的
以下是錯誤訊息以及py,請問我哪裏有疏忽了??
Instructions for updating:
Use tf.compat.v1.graph_util.extract_sub_graph
Warning: Axis pre-condition checking find multiple axis from (1, 1, 1, 128) to [ 1 128]
Warning: Axis pre-condition checking find multiple axis from (1, 1, 1, 128) to [ 1 128]
W Network may not support batch > 1 !
E Unknow layer "tensorarraygatherv3"
W ----------------Warning(1)----------------
E Try match TensorArrayGatherV3 map_1/TensorArrayStack/TensorArrayGatherV3 failed, catch exception!
E Catch exception when loading tensorflow model: ./gender.pb!
E Traceback (most recent call last):
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 643, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
E File "rknn/base/RKNNlib/RKNNnet.py", line 189, in rknn.base.RKNNlib.RKNNnet.RKNNNet.new_layer
E File "/Users/will/.pyenv/versions/3.6.8/lib/python3.6/site-packages/rknn/base/RKNNlib/RKNNlog.py", line 327, in e
E raise ValueError(msg)
E ValueError: Unknow layer "tensorarraygatherv3"
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 303, in rknn.api.rknn_base.RKNNBase.load_tensorflow
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 742, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
E File "/Users/will/.pyenv/versions/3.6.8/lib/python3.6/site-packages/rknn/base/RKNNlib/RKNNlog.py", line 327, in e
E raise ValueError(msg)
E ValueError: Try match TensorArrayGatherV3 map_1/TensorArrayStack/TensorArrayGatherV3 failed, catch exception!
--------------> Loading model done -1
# Create RKNN object
rknn = RKNN()
# Config for Model Input PreProcess
rknn.config(channel_mean_value='0 0 0 1', reorder_channel='2 1 0')
# 我input的value是 BGR [0~255]
# Load TensorFlow Model
print('--> Loading model')
ret = rknn.load_tensorflow(tf_pb='./gender.pb',
inputs=['input_image'],
outputs=['output_gender', 'output_age'],
input_size_list=[[INPUT_SIZE, INPUT_SIZE, 3]])
print('--------------> Loading model done ', ret)