|
def convert_model():
rknn = RKNN()
# Config for Model Input PreProcess
rknn.config(channel_mean_value='127.5 127.5 127.5 127.5', reorder_channel='0 1 2')
# Load TensorFlow Model
print('--> Loading model')
rknn.load_tensorflow(tf_pb='./output_inference_graph/frozen_inference_graph.pb',
inputs=['input'],
outputs=['concat', 'concat_1'],
input_size_list=[[INPUT_SIZE, INPUT_SIZE, 3]])
print('done')
# Build Model
print('--> Building model')
rknn.build(do_quantization=False, dataset='./dataset.txt')
print('done')
转换模型失败。原因应该是加载模型的时候失败了
Traceback (most recent call last): File "D:/Work/develop_file/rknn-toolkit-v1.3.0/rknn-toolkit-v1.3.0/examples/tensorflow/event_v1/conversion_model.py", line 47, in <module> convert_model() File "D:/Work/develop_file/rknn-toolkit-v1.3.0/rknn-toolkit-v1.3.0/examples/tensorflow/event_v1/conversion_model.py", line 38, in convert_model rknn.build(do_quantization=False, dataset='./dataset.txt') File "D:\Users\yajin\anaconda3\envs\MLenv\lib\site-packages\rknn\api\rknn.py", line 220, in build inputs = self.rknn_base.net.get_input_layers()AttributeError: 'NoneType' object has no attribute 'get_input_layers'想请教一下,rknn.load_tensorflow()这个方法的input参数指的是什么?怎么去找到这个input模型介绍:ssd_mobilenet_v2预训练模型经过迁移学习得到。 |
|