-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcifar_exec.sh
executable file
·117 lines (97 loc) · 3.34 KB
/
cifar_exec.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
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
#### ResNet-18
# python main.py --config configs/hypercube/resnet18/resnet18_sc_hypercube_reg.yml # 93.17% at 150 epoch
# python main.py --config configs/hypercube/resnet18/resnet18_sc_hypercube_iter_reg.yml
# python main.py --config configs/hypercube/resnet18/resnet18_sc_hypercube_iter_reg_v2.yml
# python main.py --config configs/hypercube/resnet18/resnet18_sc_hypercube_noreg.yml
# python main.py --config configs/ep/resnet18/resnet18_sc_ep.yml
# python main.py --config configs/hypercube/resnet18/resnet18_sc_hypercube_iter_reg_evaluate.yml
### ResNet-20
:<<BLOCK
# python main.py \
# --config configs/hypercube/resnet20/resnet20_random_subnet.yaml > kartik_log 2>&1
BLOCK
:<<BLOCK
python main.py --config configs/hypercube/resnet20/resnet20_sc_hypercube_reg_GD.yml
BLOCK
# HC
:<<BLOCK
python main.py \
--config configs/hypercube/resnet20/resnet20_quantized_iter_hc_0_75.yml > cifar_log 2>&1
BLOCK
# target sparsity 0.5
:<<BLOCK
python main.py \
--config configs/hypercube/resnet20/resnet20_quantized_iter_hc_target_sparsity_0_5.yml > cifar_log_target_0_5 2>&1
BLOCK
# EP
:<<BLOCK
python main.py \
--config cibfugs/ep/resnet20/resnet20_global_ep.yml > cifar_log 2>&1
BLOCK
# add score rewinding
# python main.py \
# --config configs/hypercube/resnet20/resnet20_quantized_hypercube_reg_bottom_K_rewind.yml
# python main.py --config configs/hypercube/resnet20/resnet20_wt.yml
:<<BLOCK
python main.py \
--config configs/ep/resnet18/resnet18_sc_ep.yml > cifar_log 2>&1
BLOCK
#### Conv4
# Weight training (WT)
#python main.py --config configs/training/conv4/conv4_training.yml
# EP
#python main.py --config configs/ep/conv4/conv4_sc_ep.yml
## WideResNet28
:<<BLOCK
python main.py \
--config configs/hypercube/wideresnet28/wideresnet28_weight_training.yml > wideresnet_wt_log 2>&1
BLOCK
#:<<BLOCK
# Using validation to figure out hyperparams
# NOTE: make sure to delete/comment subfolder from the config file or else it may not work
# conf_file="configs/param_tuning/resnet20_1_44/conf2"
conf_file="configs/ep/mobilenetV2/cifar10_mobileV2_ep_sparsity_1_4"
conf_end=".yml"
log_root="mobilenetV2_ep_sp1_4_adam"
log_end="_log"
subfolder_root="mobilenetV2_ep_sp1_4_adam"
ckpt_path="model_checkpoints/resnet20_wt/wt_model_after_epoch_"
for epoch in 1
do
python main.py \
--config "$conf_file$conf_end" \
--gpu 1 \
--use-full-data \
--subfolder "$subfolder_root" > "$log_root$log_end" 2>&1 &
#python main.py \
#--config "$conf_file$conf_end" \
#--trial-num $trial \
#--invert-sanity-check \
#--skip-sanity-checks \
#--subfolder "invert_$subfolder_root$trial" > "invert_$log_root$trial$log_end" 2>&1 &
done
#BLOCK
:<<BLOCK
# Final run on full data
# NOTE: make sure to delete/comment subfolder from the config file or else it may not work
conf_file="configs/param_tuning/resnet20_13_34/conf2"
conf_end=".yml"
log_root="resnet20_sp13_34_"
log_end="_log"
subfolder_root="resnet20_sp13_34_"
for trial in 1
do
python main.py \
--config "$conf_file$conf_end" \
--trial-num $trial \
--use-full-data \
--subfolder "$subfolder_root$trial" > "$log_root$trial$log_end" 2>&1 &
python main.py \
--config "$conf_file$conf_end" \
--trial-num $trial \
--invert-sanity-check \
--use-full-data \
--skip-sanity-checks \
--subfolder "invert_$subfolder_root$trial" > "invert_$log_root$trial$log_end" 2>&1 &
done
BLOCK