forked from 1026295417/pytorch-network-slimming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
experiment_resnet_tfs.sh
51 lines (45 loc) · 1.82 KB
/
experiment_resnet_tfs.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
### Sparsity on prunable BNs only ###
# prune 30% channels
python train.py --arch resnet18 \
--prune-ratio 0.3 \
--resume-path output-resnet18-bn-sparsity/ckpt_best.pth \
--epochs 450 --lr-decay-epochs 100 \
--tfs \
--outf output-resnet18-bn-pr03-tfs
# prune 50% channels
python train.py --arch resnet18 \
--prune-ratio 0.5 \
--resume-path output-resnet18-bn-sparsity/ckpt_best.pth \
--epochs 450 --lr-decay-epochs 100 \
--tfs \
--outf output-resnet18-bn-pr05-tfs
# prune 70% channels
python train.py --arch resnet18 \
--prune-ratio 0.7 \
--resume-path output-resnet18-bn-sparsity/ckpt_best.pth \
--epochs 450 --lr-decay-epochs 100 \
--tfs \
--outf output-resnet18-bn-pr07-tfs
### Sparsity on all BNs ###
# prune 30% channels
python train.py --arch resnet18 \
--prune-ratio 0.3 \
--resume-path output-resnet18-all-bn-sparsity/ckpt_best.pth \
--epochs 450 --lr-decay-epochs 100 \
--tfs \
--outf output-resnet18-all-bn-pr03-tfs
# prune 50% channels
python train.py --arch resnet18 \
--prune-ratio 0.5 \
--resume-path output-resnet18-all-bn-sparsity/ckpt_best.pth \
--epochs 450 --lr-decay-epochs 100 \
--tfs \
--outf output-resnet18-all-bn-pr05-tfs
# prune 70% channels
python train.py --arch resnet18 \
--prune-ratio 0.7 \
--resume-path output-resnet18-all-bn-sparsity/ckpt_best.pth \
--epochs 450 --lr-decay-epochs 100 \
--tfs \
--outf output-resnet18-all-bn-pr07-tfs