在 rk3399pro 上转换自己的 tensorflow 模型出错。错误如下:
E Catch exception when loading tensorflow model: ../dl_models/enhancement/E0815_99/saved_model.pb!
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 136, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 102, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.__init__
T File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 37, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.__init__
T File "rknn/base/RKNNlib/converter/tensor_util.py", line 13, in rknn.base.RKNNlib.converter.tensor_util.TensorLabelOperator.tensor_label_split
T ValueError: too many values to unpack (expected 2)
E Catch exception when loading tensorflow model: ../dl_models/enhancement/E0815_99/saved_model.pb!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 137, in rknn.api.rknn_base.RKNNBase.load_tensorflow
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 107, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.__init__
E File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 44, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.__init__
E File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 46, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.__init__
E google.protobuf.message.DecodeError: Error parsing message作者: jefferyzhang 时间: 2019-11-14 19:52
verbose=True打开看下详细log。
还有你这个pb模型你自己tf读取过能正常推理么作者: qliu 时间: 2019-11-14 20:13
开启 verbose 之后只多了一条日志:
D import clients finished
ret = rknn.load_tensorflow(
'../dl_models/enhancement/E0815_99/saved_model.pb',
inputs=['input:0'],
outputs=['clip_by_value:0'],
input_size_list=[[1, 640, 640, 1]])
if ret != 0:
print('failed to load tf model')
exit(ret)
ret = rknn.build(do_quantization=False, pre_compile=False)
if ret != 0:
print('failed to build rknn model')
exit(ret)
ret = rknn.export_rknn('enhancement.rknn')
if ret != 0:
print('failed to export rknn model')
exit(ret)