-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.py
46 lines (41 loc) · 1.5 KB
/
config.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
def config(args):
'''
Hyperparameters for all models and datasets.
'''
'''base model'''
args.learning_rate = 0.0001
args.emb_dim = 200
args.batch_size = 2048
'''other parameters'''
if args.dataset == 'ENTITY':
if args.lifelong_name == 'EWC':
args.regular_weight = 0.1
elif args.lifelong_name == 'SI':
args.regular_weight = 0.01
elif args.lifelong_name == 'LKGE':
args.regular_weight = 0.01
args.reconstruct_weight = 0.1
elif args.dataset == 'RELATION':
if args.lifelong_name == 'EWC':
args.regular_weight = 0.1
elif args.lifelong_name == 'SI':
args.regular_weight = 1.0
elif args.lifelong_name == 'LKGE':
args.regular_weight = 0.01
args.reconstruct_weight = 0.1
elif args.dataset == 'FACT':
if args.lifelong_name == 'EWC':
args.regular_weight = 0.01
elif args.lifelong_name == 'SI':
args.regular_weight = 0.01
elif args.lifelong_name == 'LKGE':
args.regular_weight = 0.01
args.reconstruct_weight = 1.0
elif args.dataset == 'HYBRID':
if args.lifelong_name == 'EWC':
args.regular_weight = 0.01
elif args.lifelong_name == 'SI':
args.regular_weight = 0.01
elif args.lifelong_name == 'LKGE':
args.regular_weight = 0.01
args.reconstruct_weight = 0.1