1、转换脚本的配置如下:
ret = rknn.load_caffe(model='./plate_recog_debug1.prototxt',
proto='lstm_caffe',
blobs='./plate_recog_new.caffemodel')
错误信息:
(venv) $ python rknn_trans.py
--> Loading model
E Catch exception when loading caffe model: ./plate_recog_debug1.prototxt!
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 257, in rknn.api.rknn_base.RKNNBase.load_caffe
T File "rknn/base/rknnlib/converter/caffeloader.py", line 959, in rknn.base.rknnlib.converter.caffeloader.CaffeLoader.load
T File "/data_1/niuyin/download/__RK3399Pro/RKNN/rknn-toolkit/package/venv/lib/python3.5/site-packages/google/protobuf/text_format.py", line 536, in Merge
T descriptor_pool=descriptor_pool)
T File "/data_1/niuyin/download/__RK3399Pro/RKNN/rknn-toolkit/package/venv/lib/python3.5/site-packages/google/protobuf/text_format.py", line 590, in MergeLines
T return parser.MergeLines(lines, message)
T File "/data_1/niuyin/download/__RK3399Pro/RKNN/rknn-toolkit/package/venv/lib/python3.5/site-packages/google/protobuf/text_format.py", line 623, in MergeLines
T self._ParseOrMerge(lines, message)
T File "/data_1/niuyin/download/__RK3399Pro/RKNN/rknn-toolkit/package/venv/lib/python3.5/site-packages/google/protobuf/text_format.py", line 638, in _ParseOrMerge
T self._MergeField(tokenizer, message)
T File "/data_1/niuyin/download/__RK3399Pro/RKNN/rknn-toolkit/package/venv/lib/python3.5/site-packages/google/protobuf/text_format.py", line 763, in _MergeField
T merger(tokenizer, message, field)
T File "/data_1/niuyin/download/__RK3399Pro/RKNN/rknn-toolkit/package/venv/lib/python3.5/site-packages/google/protobuf/text_format.py", line 837, in _MergeMessageField
T self._MergeField(tokenizer, sub_message)
T File "/data_1/niuyin/download/__RK3399Pro/RKNN/rknn-toolkit/package/venv/lib/python3.5/site-packages/google/protobuf/text_format.py", line 730, in _MergeField
T (message_descriptor.full_name, name)) T google.protobuf.text_format.ParseError: 1638:3 : Message type "caffe.LayerParameter" has no field named "reverse_param".
Load plate model failed! Ret = -1
2、如果强行将Reserve这一层删除,再次执行转换脚本,错误信息如下:
(venv) $ python rknn_trans.py
--> Loading model
done
--> Building model
E Catch exception when building RKNN model!
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 487, in rknn.api.rknn_base.RKNNBase.build
T File "rknn/api/rknn_base.py", line 416, in rknn.api.rknn_base.RKNNBase._build
T File "rknn/base/ovxconfiggenerator.py", line 156, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
T File "rknn/base/rknnlib/app/code_generator/vxconfiggenerator.py", line 189, in rknn.base.rknnlib.app.code_generator.vxconfiggenerator.VXConfigGenerator.generate
T File "rknn/base/rknnlib/app/code_generator/vxconfiggenerator.py", line 372, in rknn.base.rknnlib.app.code_generator.vxconfiggenerator.VXConfigGenerator._generate_tensors T KeyError: 'indicator_1'
done
看起来是在building RKNN模型的时候出了问题,有人碰到过类似的问题吗