paddle_lite_opt转paddlehub模型失败
Created by: nomoreorless
我想将paddlehub中的chinese_ocr_db_crnn_mobile的模型移植到手机上
- 将模型保存下来
import paddlehub as hub
ocr_model = hub.Module(name='chinese_ocr_db_crnn_mobile')
ocr_model.save_inference_model(dirname='chinese_ocr_db_crnn_mobile_lite')
td_model = hub.Module('name=chinese_text_detection_db_mobile')
td_model.save_inference_model(dirname='chinese_text_detection_db_mobile')
- 使用paddle_lite_opt转换模型
paddle_lite_opt --model_dir=text_detector --optimize_out_type=naive_buffer --valid_targets=arm --optimize_out=optimize_text_detector
报以下错误:
[libprotobuf ERROR /workspace/hzq/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/message_lite.cc:119] Can't parse message of type "paddle.framework.proto.VarType.TensorDesc" because it is missing required fields: data_type
F0921 09:15:14.706295 1097977 model_parser.cc:73] Check failed: desc.ParseFromArray(buf.get(), size) Cannot parse tensor desc
*** Check failure stack trace: ***
请帮忙看一下,是我哪里用错了吗?谢谢!