-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.py
63 lines (62 loc) · 1.71 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class Config:
def __init__(self):
self.hidden_size = 700
self.learning_rate = 5e-4
self.lambda_g=0.1
self.gamma_decay=0.5
self.model = {
"dim_c": 200,
"dim_z": 500,
"embedder": {
"dim": 100,
},
"encoder": {
"rnn_cell": {
"type": "GRUCell",
"kwargs": {
"num_units": 700
},
"dropout": {
"input_keep_prob": 0.5
}
}
},
"decoder": {
"rnn_cell": {
"type": "GRUCell",
"kwargs": {
"num_units": 700,
},
"dropout": {
"input_keep_prob": 0.5,
"output_keep_prob": 0.5
},
},
"attention": {
"type": "BahdanauAttention",
"kwargs": {
"num_units": 700,
},
"attention_layer_size": 700,
},
"max_decoding_length_train": 21,
"max_decoding_length_infer": 20,
},
"classifier": {
"kernel_size": [3, 4, 5],
"filters": 128,
"other_conv_kwargs": {"padding": "same"},
"dropout_conv": [1],
"dropout_rate": 0.5,
"num_dense_layers": 0,
"num_classes": 1
},
"opt": {
"optimizer": {
"type": "AdamOptimizer",
"kwargs": {
"learning_rate": 5e-4,
},
},
},
}