日志:
W rknn-toolkit version: 1.7.5
D Using CPPUTILS: True
I Start importing tflite...
I Model: hand_landmark_lite
I Version: 3
I Description: MLIR Converted.
I Subgraphs: 1
D import clients finished
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer conv_2d
D Convert layer max_pool_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer conv_2d
D Convert layer add
D Convert layer conv_2d
D Convert layer depthwise_conv_2d
D Convert layer mean
D Convert layer dequantize
D Convert layer dequantize
D Convert layer fully_connected
W Tensor b'model_1/model/conv_handedness/BiasAdd/ReadVariableOp/resource_dequantize' has no buffer, init to zeros.
D Convert layer logistic
D Convert layer dequantize
D Convert layer dequantize
D Convert layer fully_connected
W Tensor b'model_1/model/conv_handflag/BiasAdd/ReadVariableOp/resource_dequantize' has no buffer, init to zeros.
D Convert layer logistic
D Convert layer dequantize
D Convert layer dequantize
D Convert layer fully_connected
W Tensor b'model_1/model/conv_landmarks/BiasAdd/ReadVariableOp/resource_dequantize' has no buffer, init to zeros.
D Convert layer dequantize
D Convert layer dequantize
D Convert layer fully_connected
W Tensor b'model_1/model/conv_world_landmarks/BiasAdd/ReadVariableOp/resource_dequantize' has no buffer, init to zeros.
E Invalid tensor id(2), tensor(@model_1/model/conv_handedness/BiasAdd/ReadVariableOp/resource_dequantize_93ut0)
E Catch exception when loading tflite model: ./hand_landmark_lite.tflite!
E Traceback (most recent call last):
E File "rknn/base/RKNNlib/converter/tflite_loader.py", line 575, in rknn.base.RKNNlib.converter.tflite_loader.ModelParser.parse
E File "rknn/base/RKNNlib/converter/tflite_loader.py", line 546, in rknn.base.RKNNlib.converter.tflite_loader.ModelParser._build_connections
E File "rknn/base/RKNNlib/layer/RKNNlayer.py", line 144, in rknn.base.RKNNlib.layer.RKNNlayer.RKNNLayer.add_input
E File "rknn/base/RKNNlib/layer/RKNNlayer.py", line 26, in rknn.base.RKNNlib.layer.RKNNlayer.IoStruct.add
E File "rknn/api/rknn_log.py", line 323, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Invalid tensor id(2), tensor(@model_1/model/conv_handedness/BiasAdd/ReadVariableOp/resource_dequantize_93ut0)
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
# 加载TFLite模型
print('--> loading model')
ret = rknn.load_tflite(model='./hand_landmark_lite.tflite')
if ret != 0:
print('load model failed!')
rknn.release()
exit(ret)
print('done')
# 构建 RKNN 模型
print('--> building model')
ret = rknn.build(do_quantization=True, dataset='./hand_landmark_full.tflite')
if ret != 0:
print('build model failed!')
rknn.release()
exit(ret)
print('done')
# 导出 RKNN 模型
print('--> export RKNN model')
ret = rknn.export_rknn('./hand_landmark.rknn')
if ret != 0:
print('export model failed!')
rknn.release()
exit(ret)
print('done')