-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathcifar_experiment.sh
More file actions
executable file
·54 lines (47 loc) · 1010 Bytes
/
cifar_experiment.sh
File metadata and controls
executable file
·54 lines (47 loc) · 1010 Bytes
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
# Usage: `bash imagenet_experiment (cifar) (model) (msda_mode) (dataset path)`
# where:
# cifar is one of [cifar10, cifar100]
# model is one of [resnet, wrn, densenet, pyramidnet]
# msda_mode is one of [fmix, mixup, None]
# For multiple GPU, add --parallel=True
if [ "$1" == "cifar10" ]
then
ds=cifar10
fi
if [ "$1" == "cifar100" ]
then
ds=cifar10
fi
if [ "$2" == "resnet" ]
then
model=ResNet18
epoch=200
schedule=(100 150)
bs=128
cosine=False
fi
if [ "$2" == "wrn" ]
then
model=wrn
epoch=200
schedule=(100 150)
bs=128
cosine=False
fi
if [ "$2" == "densenet" ]
then
model=DenseNet190
epoch=300
schedule=(100 150 225)
bs=32
cosine=False
fi
if [ "$2" == "pyramidnet" ]
then
model=aa_PyramidNet
epoch=1800
schedule=2000
bs=64
cosine=True
fi
python ../trainer.py --dataset=$ds --model=$model --epoch=$epoch --schedule ${schedule[@]} --lr=0.1 --dataset-path=$4 --msda-mode=$3 --batch-size=$bs --cosine-scheduler=$cosine