forked from 1026295417/pytorch-network-slimming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
experiment_vgg.sh
32 lines (27 loc) · 1.15 KB
/
experiment_vgg.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# baseline
python train.py --arch vgg11 --outf output-vgg11
# baseline with sparsity on BNs
python train.py --arch vgg11 --l1-decay 1e-4 \
--outf output-vgg11-bn-sparsity
# prune 30% channels
python train.py --arch vgg11 \
--prune-ratio 0.3 \
--resume-path output-vgg11-bn-sparsity/ckpt_best.pth \
--epochs 30 --lr-decay-epochs 8 --lr-decay-factor 0.1 --lr 0.001 \
--weight-decay 3e-2 \
--outf output-vgg11-bn-pr03
# prune 50% channels
python train.py --arch vgg11 \
--prune-ratio 0.5 \
--resume-path output-vgg11-bn-sparsity/ckpt_best.pth \
--epochs 50 --lr-decay-epochs 14 --lr-decay-factor 0.1 --lr 0.001 \
--weight-decay 3e-2 \
--outf output-vgg11-bn-pr05
# prune 70% channels
python train.py --arch vgg11 \
--prune-ratio 0.7 \
--resume-path output-vgg11-bn-sparsity/ckpt_best.pth \
--epochs 100 --lr-decay-epochs 30 --lr-decay-factor 0.1 --lr 0.001 \
--weight-decay 1e-3 \
--outf output-vgg11-bn-pr07