-
Notifications
You must be signed in to change notification settings - Fork 16
/
decompattn_graph.json
132 lines (131 loc) · 3.35 KB
/
decompattn_graph.json
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
{
"dataset_reader": {
"type": "scitail_graph",
"token_indexers": {
"tokens": {
"type": "single_id",
"lowercase_tokens": true
}
},
"tokenizer": {
"end_tokens": ["@@NULL@@"]
},
"entities_tokenizer": {
"word_splitter": {
"type": "entities_splitter"
}
}
},
// relative to project root
"train_data_path":
"../CSNLI/data/nli_datasets/scitail/conceptnet_entities/parsed/scitail_1.0_train_conceptnet_entities.tsv",
"validation_data_path":
"../CSNLI/data/nli_datasets/scitail/conceptnet_entities/parsed/scitail_1.0_dev_conceptnet_entities.tsv",
"model": {
"type": "graph_and_text",
"text_model": {
"type": "decompattn",
"text_field_embedder": {
"tokens": {
"type": "embedding",
"projection_dim": 200,
"pretrained_file": "./data/embeddings/glove/glove.840B.300d.txt.gz",
"embedding_dim": 300,
"trainable": false
}
},
"attend_feedforward": {
"input_dim": 200,
"num_layers": 2,
"hidden_dims": 200,
"activations": "relu",
"dropout": 0.2
},
"similarity_function": { "type": "dot_product" },
"compare_feedforward": {
"input_dim": 400,
"num_layers": 2,
"hidden_dims": 200,
"activations": "relu",
"dropout": 0.2
},
"aggregate_feedforward": {
"input_dim": 400,
"num_layers": 2,
"hidden_dims": [200, 2],
"activations": ["relu", "linear"],
"dropout": [0.2, 0.0]
},
"initializer": [
[".*linear_layers.*weight", { "type": "xavier_normal" }],
[
".*token_embedder_tokens._projection.*weight",
{ "type": "xavier_normal" }
]
]
},
"graph_model": {
"type": "simple_graph",
"entities_embedder": {
"tokens": {
"type": "embedding",
"projection_dim": 200,
"pretrained_file": "./data/embeddings/conceptnet/transh.txt.gz",
"embedding_dim": 300,
"trainable": false
}
},
"inter_attention": {
"type": "dot_product"
},
"project_feedforward": {
"input_dim": 800,
"num_layers": 2,
"hidden_dims": 200,
"activations": "relu",
"dropout": 0.2
},
"aggregate_feedforward": {
"input_dim": 800,
"num_layers": 2,
"hidden_dims": [200, 2],
"activations": ["relu", "linear"],
"dropout": [0.2, 0.0]
},
"initializer": [
[".*linear_layers.*weight", { "type": "xavier_normal" }],
[
".*token_embedder_tokens._projection.*weight",
{ "type": "xavier_normal" }
]
]
},
"classify_feed_forward": {
"input_dim": 1200,
"num_layers": 2,
"hidden_dims": [600, 2],
"activations": ["relu", "linear"],
"dropout": [0.2, 0.0]
}
},
"iterator": {
"type": "bucket",
"sorting_keys": [
["premise", "num_tokens"],
["hypothesis", "num_tokens"],
["premise_entities", "num_tokens"],
["hypothesis_entities", "num_tokens"]
],
"batch_size": 64
},
"trainer": {
"num_epochs": 140,
"patience": 20,
"cuda_device": -1,
"grad_clipping": 5.0,
"validation_metric": "+accuracy",
"optimizer": {
"type": "adagrad"
}
}
}