-
Notifications
You must be signed in to change notification settings - Fork 1
/
experiment.sh
executable file
·53 lines (44 loc) · 1.7 KB
/
experiment.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
#/bin/bash
# CIL CONFIG
NOTE="test" # Short description of the experiment. (WARNING: logs/results with the same note will be overwritten!)
MODE="sdp"
DATASET="cifar10" # cifar10, cifar100, tinyimagenet, imagenet
SIGMA=10
REPEAT=1
INIT_CLS=100
SDP_MEAN=10000
SDP_VAR=0.75
GPU_TRANSFORM="--gpu_transform"
USE_AMP="--use_amp"
SEEDS="1"
if [ "$DATASET" == "cifar10" ]; then
MEM_SIZE=500 ONLINE_ITER=1
MODEL_NAME="resnet18" EVAL_PERIOD=100 F_PERIOD=10000 IMP_UPDATE_PERIOD=1
BATCHSIZE=16; LR=3e-4 OPT_NAME="adam" SCHED_NAME="default"
elif [ "$DATASET" == "cifar100" ]; then
MEM_SIZE=2000 ONLINE_ITER=3
MODEL_NAME="resnet18" EVAL_PERIOD=100 F_PERIOD=10000 IMP_UPDATE_PERIOD=1
BATCHSIZE=16; LR=3e-4 OPT_NAME="adam" SCHED_NAME="default"
elif [ "$DATASET" == "tinyimagenet" ]; then
MEM_SIZE=4000 ONLINE_ITER=3
MODEL_NAME="resnet18" EVAL_PERIOD=200 F_PERIOD=20000
BATCHSIZE=32; LR=3e-4 OPT_NAME="adam" SCHED_NAME="default" IMP_UPDATE_PERIOD=1
elif [ "$DATASET" == "imagenet" ]; then
MEM_SIZE=20000 ONLINE_ITER=0.25
MODEL_NAME="resnet18" EVAL_PERIOD=2000 F_PERIOD=100000
BATCHSIZE=256; LR=3e-4 OPT_NAME="adam" SCHED_NAME="default" IMP_UPDATE_PERIOD=10
else
echo "Undefined setting"
exit 1
fi
for RND_SEED in $SEEDS
do
python main.py --mode $MODE \
--dataset $DATASET --n_worker 4 \
--sigma $SIGMA --repeat $REPEAT --init_cls $INIT_CLS \
--rnd_seed $RND_SEED \
--model_name $MODEL_NAME --opt_name $OPT_NAME --sched_name $SCHED_NAME \
--lr $LR --batchsize $BATCHSIZE \
--memory_size $MEM_SIZE $GPU_TRANSFORM --online_iter $ONLINE_ITER --sdp_mean $SDP_MEAN --sdp_var $SDP_VAR \
--note $NOTE --eval_period $EVAL_PERIOD $USE_AMP --f_period $F_PERIOD
done