This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
run_experiments.sh
executable file
·65 lines (50 loc) · 2.23 KB
/
run_experiments.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
#!/bin/bash
MY_PYTHON="python"
MNIST_ROTA="--n_layers 2 --n_hiddens 100 --data_path data/ --save_path results/ --batch_size 10 --log_every 100 --samples_per_task 1000 --data_file mnist_rotations.pt --cuda no --seed 0"
MNIST_PERM="--n_layers 2 --n_hiddens 100 --data_path data/ --save_path results/ --batch_size 10 --log_every 100 --samples_per_task 1000 --data_file mnist_permutations.pt --cuda no --seed 0"
CIFAR_100i="--n_layers 2 --n_hiddens 100 --data_path data/ --save_path results/ --batch_size 10 --log_every 100 --samples_per_task 2500 --data_file cifar100.pt --cuda yes --seed 0"
# build datasets
cd data/
cd raw/
$MY_PYTHON raw.py
cd ..
$MY_PYTHON mnist_permutations.py \
--o mnist_permutations.pt \
--seed 0 \
--n_tasks 20
$MY_PYTHON mnist_rotations.py \
--o mnist_rotations.pt\
--seed 0 \
--min_rot 0 \
--max_rot 180 \
--n_tasks 20
$MY_PYTHON cifar100.py \
--o cifar100.pt \
--seed 0 \
--n_tasks 20
cd ..
# model "single"
$MY_PYTHON main.py $MNIST_ROTA --model single --lr 0.003
$MY_PYTHON main.py $MNIST_PERM --model single --lr 0.03
$MY_PYTHON main.py $CIFAR_100i --model single --lr 1.0
# model "independent"
$MY_PYTHON main.py $MNIST_ROTA --model independent --lr 0.1 --finetune yes
$MY_PYTHON main.py $MNIST_PERM --model independent --lr 0.03 --finetune yes
$MY_PYTHON main.py $CIFAR_100i --model independent --lr 0.3 --finetune yes
# model "multimodal"
$MY_PYTHON main.py $MNIST_ROTA --model multimodal --lr 0.1
$MY_PYTHON main.py $MNIST_PERM --model multimodal --lr 0.1
# model "EWC"
$MY_PYTHON main.py $MNIST_ROTA --model ewc --lr 0.01 --n_memories 1000 --memory_strength 1000
$MY_PYTHON main.py $MNIST_PERM --model ewc --lr 0.1 --n_memories 10 --memory_strength 3
$MY_PYTHON main.py $CIFAR_100i --model ewc --lr 1.0 --n_memories 10 --memory_strength 1
# model "iCARL"
$MY_PYTHON main.py $CIFAR_100i --model icarl --lr 1.0 --n_memories 1280 --memory_strength 1
# model "GEM"
$MY_PYTHON main.py $MNIST_ROTA --model gem --lr 0.1 --n_memories 256 --memory_strength 0.5
$MY_PYTHON main.py $MNIST_PERM --model gem --lr 0.1 --n_memories 256 --memory_strength 0.5
$MY_PYTHON main.py $CIFAR_100i --model gem --lr 0.1 --n_memories 256 --memory_strength 0.5
# plot results
cd results/
$MY_PYTHON plot_results.py
cd ..