mobilenet ssd v3模型导入失败
Created by: johnrayn
从tensorflow model下载预训练的模型http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v3_small_coco_2019_08_14.tar.gz
用tensorflow object detection工具
export_tflite_ssd_graph.py --pipeline_config_path ../ssd_mobilenet_v3_small_coco_2019_08_14/pipeline.config --trained_checkpoint_prefix ../ssd_mobilenet_v3_small_coco_2019_08_14/model.ckpt --output_directory ssd_mobilenet_v3_small --add_postprocessing_op=false
再用
x2paddle --framework=tensorflow --model=ssd_mobilenet_v3_small/tflite_graph.pb --save_dir=ssd_mobilenet_v3_small
用opt检查
./opt --print_model_ops=true --model_dir=ssd_mobilenet_v3_small/inference_model --valid_targets=arm
结果是正确的 “Paddle-Lite supports this model!”
但是
./opt --model_dir=ssd_mobilenet_v3_small/inference_model --valid_targets=arm --optimize_out_type=naive_buffer --optimize_out=v3_opt
返回错误
[I 3/18 7:31:22.689 ...g/paddle/Paddle-Lite/lite/api/cxx_api.cc:245 Build] Load model from file.
[I 3/18 7:31:22.724 ...paddle/Paddle-Lite/lite/core/optimizer.h:174 RunPasses] == Running pass: lite_quant_dequant_fuse_pass
[I 3/18 7:31:22.737 ...paddle/Paddle-Lite/lite/core/optimizer.h:191 RunPasses] == Finished running: lite_quant_dequant_fuse_pass
[I 3/18 7:31:22.737 ...paddle/Paddle-Lite/lite/core/optimizer.h:174 RunPasses] == Running pass: weight_quantization_preprocess_pass
[I 3/18 7:31:22.738 ...paddle/Paddle-Lite/lite/core/optimizer.h:191 RunPasses] == Finished running: weight_quantization_preprocess_pass
[I 3/18 7:31:22.738 ...paddle/Paddle-Lite/lite/core/optimizer.h:174 RunPasses] == Running pass: lite_conv_elementwise_fuse_pass
[I 3/18 7:31:22.745 ...le-Lite/lite/core/mir/pattern_matcher.cc:108 operator()] detected 30 subgraph
[I 3/18 7:31:22.747 ...paddle/Paddle-Lite/lite/core/optimizer.h:191 RunPasses] == Finished running: lite_conv_elementwise_fuse_pass
[I 3/18 7:31:22.748 ...paddle/Paddle-Lite/lite/core/optimizer.h:174 RunPasses] == Running pass: lite_conv_bn_fuse_pass
[I 3/18 7:31:22.766 ...le-Lite/lite/core/mir/pattern_matcher.cc:108 operator()] detected 31 subgraph
[I 3/18 7:31:22.773 ...le-Lite/lite/core/mir/pattern_matcher.cc:108 operator()] detected 27 subgraph
[I 3/18 7:31:22.775 ...paddle/Paddle-Lite/lite/core/optimizer.h:191 RunPasses] == Finished running: lite_conv_bn_fuse_pass
[I 3/18 7:31:22.775 ...paddle/Paddle-Lite/lite/core/optimizer.h:174 RunPasses] == Running pass: lite_conv_elementwise_fuse_pass
[I 3/18 7:31:22.779 ...le-Lite/lite/core/mir/pattern_matcher.cc:108 operator()] detected 9 subgraph
Segmentation fault (core dumped)