剪裁蒸馏模型导出错误
Created by: pele228
按照教程里的模型导出方法
python tools/export_model.py -c configs/yolov3_mobilenet_v1_voc_mydata.yml
--output_dir=./inference_model
-o weights=output/yolov3_mobilenet_v1_voc_mydata/60000
导出剪裁蒸馏模型报错如下
aistudio@jupyter-135123-311635:~/work/PaddleDetection$ python tools/export_model.py -c configs/yolov3_mobilenet_v1_voc_mydata.yml --output_dir=./inference_model -o weights=output/yolov3_mobilenet_v1_voc_mydata/60000 2020-03-23 09:15:21,000-INFO: Loading parameters from output/yolov3_mobilenet_v1_voc_mydata/60000... Traceback (most recent call last): File "tools/export_model.py", line 114, in main() File "tools/export_model.py", line 101, in main checkpoint.load_params(exe, infer_prog, cfg.weights) File "/home/aistudio/work/PaddleDetection/ppdet/utils/checkpoint.py", line 142, in load_params fluid.io.set_program_state(prog, state) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/io.py", line 1943, in set_program_state .format(orig_para_np.shape, para.name, new_para_np.shape) AssertionError: Shape not matching: the Program requires a parameter with a shape of ((1024, 512, 3, 3)), while the loaded parameter (namely [ yolo_block.0.1.1.conv.weights ]) has a shape of ((1024, 307, 3, 3)).