-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbest_hyperparams.py
144 lines (129 loc) · 3.8 KB
/
best_hyperparams.py
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
def get_best_params(approach, experiment):
#the best hyperparams for all the experiments
param = None
epochs = 200
lr = 0.05
if experiment == 'mixture':
if approach in ['ewc', 'ewc-film']:
param = 5
if approach == 'hat':
param = '0.75,400'
if approach == 'imm-mean':
param = 0.0001
if approach == 'imm-mode':
param = '1'
if approach == 'lfl':
param = 0.05
if approach == 'lwf':
param = '2,1'
if approach == 'pathnet':
param = 20
if approach == 'gvclf':
param = '0.2,100'
if approach == 'gvcl':
param = '0.2, 1000'
if approach == 'vcl':
param = '1,1'
if 'vcl' in approach:
epochs = 180
lr = 1e-4
elif experiment == 'cifar' or 'split_cifar100':
if approach in ['ewc', 'ewc-film']:
param = 100
if approach == 'hat':
param = '0.025,50'
if approach == 'imm-mean':
param = 0.0001
if approach == 'imm-mode':
param = '1e-5'
if approach == 'lfl':
param = 0.05
if approach == 'lwf':
param = '2,4'
if approach == 'pathnet':
param = 100
if approach == 'gvclf' or approach == 'gvclf_vd':
param = '0.2,100'
if approach == 'gvcl':
param = '0.2,1000'
if approach == 'vcl':
param = '1,1'
if 'vcl' in approach:
epochs = 60
lr = 1e-3
elif experiment == 'easy-chasy':
epochs = 1000
if approach in ['ewc', 'ewc-film']:
param = 100
if approach == 'hat':
param = '1,10'
if approach == 'imm-mean':
param = 0.0005
if approach == 'imm-mode':
param = '1e-7'
if approach == 'lfl':
param = 0.1
if approach == 'lwf':
param = '0.5,4'
if approach == 'pathnet':
param = 20
if approach == 'gvclf':
param = '0.05,10'
if approach == 'gvcl':
param = '0.05,100'
if approach == 'vcl':
param = '1,1'
if 'vcl' in approach:
epochs = 1500
lr = 1e-3
elif experiment == 'hard-chasy':
epochs = 1000
if approach in ['ewc', 'ewc-film']:
param = 500
if approach == 'hat':
param = '1,50'
if approach == 'imm-mean':
param = '1e-6'
if approach == 'imm-mode':
param = '0.1'
if approach == 'lfl':
param = 0.1
if approach == 'lwf':
param = '0.5,2'
if approach == 'pathnet':
param = 200
if approach == 'gvclf':
param = '0.05,10'
if approach == 'gvcl':
param = '0.05,100'
if approach == 'vcl':
param = '1,1'
if 'vcl' in approach:
epochs = 1500
lr = 1e-3
elif experiment == 'smnist' or experiment == 'split_mnist':
if approach in ['ewc', 'ewc-film']:
# param = 1 #10000
param = 10000
if approach == 'hat':
param = '0.1,50'
if approach == 'imm-mean':
param = 0.0005
if approach == 'imm-mode':
param = '0.1'
if approach == 'lfl':
param = 0.1
if approach == 'lwf':
param = '2,4'
if approach == 'pathnet':
param = 10
if approach == 'gvclf':
param = '0.1,100'
if approach == 'gvcl':
param = '0.1,1'
if approach == 'vcl':
param = '1,1'
if 'vcl' in approach:
epochs = 100
lr = 1e-3
return param, lr, epochs