-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfile.json
97 lines (84 loc) · 2.34 KB
/
file.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
{
"dataset_reader": {
"type": "ontonotes_ner",
"coding_scheme": "BIOUL",
"token_indexers": {
"tokens": {
"type": "ner_tag",
},
"token_characters": {
"type": "characters",
"min_padding_length": 3
},
"elmo": {
"type": "elmo_characters"
},
"bert": {
"type": "bert-pretrained",
"pretrained_model":"bert-base-cased",
"do_lowercase": false,
"use_starting_offsets": true
}
}
},
"train_data_path": "/home/mrim/affim/conll-2012/v4/data/train/data/english/",
"validation_data_path": "/home/mrim/affim/conll-2012/v4/data/development/data/english/",
"model": {
"type": "crf_tagger",
"label_encoding": "BIOUL",
"dropout": 0.5,
"include_start_end_transitions": false,
"text_field_embedder": {
"allow_unmatched_keys": true,
"token_embedders": {
"tokens": {
"type": "bert-pretrained",
"pretrained_model": "bert-base-cased"
},
"embedder_to_indexer_map": {
"bert": ["bert", "bert-offsets"],
"token_characters": ["token_characters"],
},
"elmo":{
"type": "elmo_token_embedder",
"options_file": "https://allennlp.s3.amazonaws.com/models/elmo/2x4096_512_2048cnn_2xhighway/elmo_2x4096_512_2048cnn_2xhighway_options.json",
"weight_file": "https://allennlp.s3.amazonaws.com/models/elmo/2x4096_512_2048cnn_2xhighway/elmo_2x4096_512_2048cnn_2xhighway_weights.hdf5",
"do_layer_norm": false,
"dropout": 0.0
}}
},
"encoder": {
"type": "lstm",
"input_size": 1792,
"hidden_size": 200,
"num_layers": 2,
"dropout": 0.5,
"bidirectional": true
},
"regularizer": [
[
"scalar_parameters",
{
"type": "l2",
"alpha": 0.1
}
]
]
},
"iterator": {
"type": "basic",
"batch_size": 64
},
"trainer": {
"optimizer": {
"type": "adam",
"lr": 0.001
},
"validation_metric": "+f1-measure-overall",
"num_serialized_models_to_keep": 3,
"num_epochs": 200,
"grad_norm": 5.0,
"patience": 25,
"cuda_device": -1
}
}