-
Notifications
You must be signed in to change notification settings - Fork 10
/
train_all.sh
45 lines (39 loc) · 1005 Bytes
/
train_all.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
models="mobilenet_v3_large_nose"
# exit when any command fails
set -e
epochs=120
batch_size=64
learning_rate=0.01
ss="0.0001"
prune_ratios="0.5 0.75"
fine_tune_epochs=120
fine_tune_learning_rate=0.01
output_dir="./output"
for net in $models; do
for s in $ss; do
save_dir=${output_dir}/"${net}_s_${s}"
# python3 main.py \
# --save_dir $save_dir \
# --net $net \
# --epoch $epochs \
# --batch_size $batch_size \
# --learning_rate $learning_rate \
# --sparsity_train \
# --s $s
for prune_ratio in $prune_ratios; do
python3 main.py \
--save_dir ${save_dir} \
--net $net \
--batch_size $batch_size \
--ckpt ${save_dir}/last.ckpt \
--fine_tune \
--prune_schema ./schema/$net.json \
--fine_tune_epoch $fine_tune_epochs \
--fine_tune_learning_rate $fine_tune_learning_rate \
--prune_ratio $prune_ratio \
--device cpu \
--s $s
done
done
done
python3 summary.py