-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
57 lines (53 loc) · 1.74 KB
/
run.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
dataname=$1
num_classes=$2
opt_list='SGD Adam'
lr_list='0.1 0.01 0.001'
aug_list='default weak strong'
bs_list='16 64 256'
for bs in $bs_list
do
for opt in $opt_list
do
for lr in $lr_list
do
for aug in $aug_list
do
# use scheduler
echo "bs: $bs, opt: $opt, lr: $lr, aug: $aug, use_sched: True"
EXP_NAME="bs_$bs-opt_$opt-lr_$lr-aug_$aug-use_sched"
if [ -d "$EXP_NAME" ]
then
echo "$EXP_NAME is exist"
else
python main.py \
--exp-name $EXP_NAME \
--dataname $dataname \
--num-classes $num_classes \
--opt-name $opt \
--aug-name $aug \
--batch-size $bs \
--lr $lr \
--use_scheduler \
--epochs 50
fi
# not use scheduler
echo "bs: $bs, opt: $opt, lr: $lr, aug: $aug, use_sched: False"
EXP_NAME="bs_$bs-opt_$opt-lr_$lr-aug_$aug"
if [ -d "$EXP_NAME" ]
then
echo "$EXP_NAME is exist"
else
python main.py \
--exp-name $EXP_NAME \
--dataname $dataname \
--num-classes $num_classes \
--opt-name $opt \
--aug-name $aug \
--batch-size $bs \
--lr $lr \
--epochs 50
fi
done
done
done
done