-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathimp_exec.sh
More file actions
126 lines (108 loc) · 2.37 KB
/
imp_exec.sh
File metadata and controls
126 lines (108 loc) · 2.37 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# ===== warm short IMP ===== #
subfd="imp_resnet32_"
# subfd="cifar_resnet_check_sparse_mask_1_4_at_init"
n_gpu=0
python imp_main.py \
--config configs/imp/resnet32_cifar100.yml \
--imp-rounds 30 \
--gpu $n_gpu \
--subfolder $subfd #> imp_log 2>&1
:<<BLOCK
subfd="cifar_resnet_create_dense_checkpoints"
python imp_main_test_mask.py \
--config configs/imp/resnet20.yml \
--gpu $n_gpu \
--imp-resume-iter 1000 \
--subfolder $subfd &
python imp_main_test_mask.py \
--config configs/imp/resnet20.yml \
--gpu $n_gpu \
--imp-resume-epoch 50 \
--subfolder $subfd &
python imp_main_test_mask.py \
--config configs/imp/resnet20.yml \
--gpu $n_gpu \
--imp-resume-epoch 3 \
--subfolder $subfd &
python imp_main_test_mask.py \
--config configs/imp/resnet20.yml \
--gpu $n_gpu \
--imp-resume-epoch 10 \
--subfolder $subfd &
n_gpu=2
python imp_main_test_mask.py \
--config configs/imp/resnet20.yml \
--gpu $n_gpu \
--imp-resume-iter 300 \
--subfolder $subfd &
python imp_main_test_mask.py \
--config configs/imp/resnet20.yml \
--gpu $n_gpu \
--imp-resume-epoch 1 \
--subfolder $subfd &
python imp_main_test_mask.py \
--config configs/imp/resnet20.yml \
--gpu $n_gpu \
--imp-resume-iter 100 \
--subfolder $subfd &
BLOCK
:<<BLOCK
for i in 14 13 7 3 1 0
do
python imp_sanity.py \
--config configs/imp/resnet20.yml \
--subfolder $subfd \
--imp-resume-round $i \
--imp-rewind-model results/$subfd/Liu_checkpoint_model_correct.pth \
--gpu $n_gpu
done
BLOCK
# IMP
:<<BLOCK
subfd = short_imp_sgd
python imp_main.py \
--arch resnet20 \
--dataset CIFAR10 \
--algo imp \
--optimizer sgd \
--lr 0.1 \
--lr-policy multistep_lr \
--lr-gamma 0.1 \
--epochs 150 \
--wd 1e-4 \
--momentum 0.9 \
--batch-size 128 \
--iter_period 5 \
--seed 42 \
--prune-rate 0.2 \
--imp_rewind_iter 1000 \
--conv-type SubnetConv \
--bn-type NonAffineBatchNorm \
--gpu 1 \
--init kaiming_normal \
--subfolder "$subfd/"
BLOCK
:<<BLOCK
for i in 19
do
python imp_sanity.py \
--arch resnet20 \
--dataset CIFAR10 \
--algo imp \
--optimizer sgd \
--subfolder "$subfd" \
--lr 0.1 \
--lr-policy multistep_lr \
--lr-gamma 0.1 \
--epochs 150 \
--wd 1e-4 \
--momentum 0.9 \
--batch-size 128 \
--seed 42 \
--conv-type SubnetConv \
--bn-type NonAffineBatchNorm \
--imp-resume-round $i \
--imp-rewind-model results/$subfd/Liu_checkpoint_model_correct.pth \
--gpu 2
done
BLOCK