-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprune.sh
71 lines (63 loc) · 3.28 KB
/
prune.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## vgg-cifar10
prune_rate=0.65
train_dir="vgg-cifar10-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=1 python -u auto_prune.py --train_dir=$train_dir --dataset="cifar10" --data_dir="./data" \
--network="vgg16" --alpha=1.0 --beta=0.0 --gamma=3.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## vgg-cifar100
prune_rate=0.40
train_dir="vgg-cifar100-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=1 python -u auto_prune.py --train_dir=$train_dir --dataset="cifar100" --data_dir="./data" \
--network="vgg16" --alpha=1.0 --beta=0.0 --gamma=3.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## vgg-imagenet
prune_rate=0.50
train_dir="vgg-imagenet-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=2,3 python -u auto_prune.py --train_dir=$train_dir --dataset="imagenet" --data_dir="./data" \
--network="vgg11" --alpha=1.0 --beta=0.0 --gamma=1.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## mobilenet-cifar10
prune_rate=0.50
train_dir="mobilenet-cifar10-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=1 python -u auto_prune.py --train_dir=$train_dir --dataset="cifar10" --data_dir="./data" \
--network="mobilenet_for_cifar" --alpha=1.0 --beta=0.1 --gamma=0.9 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## mobilenet-cifar100
prune_rate=0.50
train_dir="mobilenet-cifar100-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=1 python -u auto_prune.py --train_dir=$train_dir --dataset="cifar100" --data_dir="./data" \
--network="mobilenet_for_cifar" --alpha=1.0 --beta=1.0 --gamma=1.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## mobilenet-imagenet
prune_rate=0.30
train_dir="mobilenet-imagenet-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=1,2 python -u auto_prune.py --train_dir=$train_dir --dataset="imagenet" --data_dir="./data" \
--network="mobilenet_for_imagenet" --alpha=1.0 --beta=1.0 --gamma=1.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## resnet32-cifar10
prune_rate=0.30
train_dir="resnet32-cifar10-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=3 python -u auto_prune.py --train_dir=$train_dir --dataset="cifar10" --data_dir="./data" \
--network="resnet32" --alpha=1.0 --beta=3.0 --gamma=0.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## resnet32-cifar100
prune_rate=0.20
train_dir="resnet32-cifar100-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=1 python -u auto_prune.py --train_dir=$train_dir --dataset="cifar100" --data_dir="./data" \
--network="resnet32" --alpha=1.0 --beta=3.0 --gamma=0.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log
## resnet18-imagenet
prune_rate=0.32
train_dir="resnet18-imagenet-model/n1"
mkdir -p $train_dir/prune$prune_rate
CUDA_VISIBLE_DEVICES=0,2 python -u auto_prune.py --train_dir=$train_dir --dataset="imagenet" --data_dir="./data" \
--network="resnet18" --alpha=1.0 --beta=1.0 --gamma=1.0 --prune_rate=$prune_rate \
2>&1 | tee -a $train_dir/prune$prune_rate/finetune.log