distill_pruned_model.py训练报错YOLOv3 output layer number not equal target number
Created by: SangerY
aistudio上训练了pp-yolo模型作为teacher模型,进行剪枝蒸馏训练,报错YOLOv3 output layer number not equal target number。 训练代码:
%cd /home/aistudio/work/PaddleDetection
!python slim/extensions/distill_pruned_model/distill_pruned_model.py \
-c ./configs/yolov3_mobilenet_v1.yml \
-t ./configs/ppyolo/ppyolo.yml \
--teacher_pretrained=output/ppyolo/best_model \
--pruned_params "yolo_block.0.0.0.conv.weights,yolo_block.0.0.1.conv.weights,yolo_block.0.1.0.conv.weights" \
--pruned_ratios="0.2,0.3,0.4" \
-o use_fine_grained_loss=true pretrain_weights=https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_voc.tar