tanluren / yolov3-channel-and-layer-pruning

yolov3 yolov4 channel and layer pruning, Knowledge Distillation 层剪枝,通道剪枝,知识蒸馏
Apache License 2.0
1.5k stars 446 forks source link

fine-tune 時,mAP下降很多 #138

Open chingi071 opened 3 years ago

chingi071 commented 3 years ago

您好,我想請教一下 我使用 prune.py 做剪枝後的 mAP 是 0.72 1

但是我將他 fine-tune 時,mAP 下降到幾乎為 0 了,請問是哪邊有錯誤嗎? 謝謝。 我執行的指令如下: python train.py --cfg ../prune_0.1_Person_detection/prune_0.1_cfg/prune_0.1_yolov4-tiny-obj.cfg --weights ../prune_0.1_Person_detection/prune_0.1_weights/prune_0.1_yolov4-tiny-obj_final.weights --data ../Person_detection/cfg/person-prune.data --epochs 50 --batch-size 32

以下是訓練時的訊息: learning rate: 0.0011625 /home/joy/.local/lib/python3.6/site-packages/torch/cuda/memory.py:346: FutureWarning: torch.cuda.memory_cached has been renamed to torch.cuda.memory_reserved FutureWarning) 1/49 0.367G 1.38 6.37 0 7.76 0 0 4 160: Class Images Targets P R mAP F1: 100%|█| 69/69 [03:4 all 2.18e+03 3.88e+03 0.0288 0.295 0.0927 0.0525

 Epoch   gpu_mem      GIoU       obj       cls     total      soft    rratio   targets  img_size

0%| | 0/274 [00:00<?, ?it/s]learning rate: 0.002324 2/49 0.367G 1.12 5.61 0 6.73 0 0 8 160: Class Images Targets P R mAP F1: 100%|█| 69/69 [01:4 all 2.18e+03 3.88e+03 0.00237 0.00954 2.99e-05 0.00379

 Epoch   gpu_mem      GIoU       obj       cls     total      soft    rratio   targets  img_size

0%| | 0/274 [00:00<?, ?it/s]learning rate: 0.0034855 Gradient overflow. Skipping step, loss scaler 0 reducing loss scale to 1024.0 3/49 0.367G 1.04 5.2 0 6.24 0 0 4 160: Class Images Targets P R mAP F1: 90%|▉| 62/69 [04:

anusha657 commented 3 years ago

@chingi071 Can you pls tell the folder structure you have used for sparsity Training ? I mean .data file and the .txt file. Since for me during the sparsity training only 1 Img is getting detected and its corresponding label .

I have added my query in detail in https://github.com/tanluren/yolov3-channel-and-layer-pruning/issues/135

Thanks in advance :)

chingi071 commented 3 years ago

@anusha657 This is my folder structure. 圖片1

anusha657 commented 3 years ago

Thanks @chingi071 for the response