Skip to content

jjxxmiin/Network_Trimming_Pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network_Trimming_Pytorch

Implementation network trimming using pytorch

ImageNet

- datasets
    - imagenet - train
               - val
               - valprep.sh
- Prune_QTorch

Download : valprep.sh

./valprep.sh

How to use

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

pruning

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

fine tune

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

Benchmark

  • 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

Reference

About

Implementation network trimming using pytorch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages