Implementation network trimming using pytorch
- datasets
- imagenet - train
- val
- valprep.sh
- Prune_QTorch
Download : valprep.sh
./valprep.sh
compress rate | Conv 5-3 | FC 6 |
---|---|---|
1.00 | 512 | 4096 |
1.19 | 488 | 3477 |
1.45 | 451 | 2937 |
1.71 | 430 | 2479 |
1.96 | 420 | 2121 |
2.28 | 400 | 1787 |
2.59 | 390 | 1513 |
python prune.py --data_path ../datasets/imagenet \
--save_path ./apoz_prune_model.pth.tar \
--apoz_path ./vgg_apoz_fc.pkl \
--select_rate 0
- pruning layer :
Conv 5-3
,FC 6
python finetune.py --data_path ../datasets/imagenet \
--save_path ./apoz_fine_tune_model.pth.tar \
--prune_path ./apoz_prune_model.pth.tar \
--batch_size 128 \
--epoch 5
- prune
0 : 488, 3477
Before Pruning
Acc@1: 71.59
Acc@5: 90.38
After Pruning
Acc@1: 70.37
Acc@5: 89.76
- finetune
Conv 5-3 : 512 -> 488
FC 6 : 4096 -> 3477
Before Fine tune
Acc@1: 70.37
Acc@5: 89.76
After Fine tune
Acc@1: 71.48
Acc@5: 90.26