-
Notifications
You must be signed in to change notification settings - Fork 5
/
config_train_baseline.py
55 lines (51 loc) · 1.19 KB
/
config_train_baseline.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
from utils_e2e_clean import get_scope_name_of_train_op
max_epochs = int(12)
steps_per_eval = int(600)
infer_beam_width = 5
infer_max_decoding_length = 50
train = {
'joint': {
'optimizer': {
'type': 'AdamOptimizer',
'kwargs': {
'learning_rate': 1e-3
}
},
'gradient_clip': {
'type': 'clip_by_global_norm',
'kwargs': {
'clip_norm': 15
}
},
},
'disc': {
'optimizer': {
'type': 'AdamOptimizer',
'kwargs': {
'learning_rate': 1e-3
}
},
'gradient_clip': {
'type': 'clip_by_global_norm',
'kwargs': {
'clip_norm': 15
}
},
},
'align': {
'optimizer': {
'type': 'AdamOptimizer',
'kwargs': {
'learning_rate': 1e-3
}
},
'gradient_clip': {
'type': 'clip_by_global_norm',
'kwargs': {
'clip_norm': 15
}
},
},
}
for name, hparams in train.items():
hparams['name'] = get_scope_name_of_train_op(name)