forked from Tencent/NeuralNLP-NeuralClassifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain.hierar.json
161 lines (161 loc) · 3.55 KB
/
train.hierar.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"task_info": {
"label_type": "multi_label",
"hierarchical": true,
"hierar_taxonomy": "data/rcv1.taxonomy",
"hierar_penalty": 0.000001
},
"device": "cuda",
"model_name": "TextRNN",
"checkpoint_dir": "checkpoint_dir_rcv1",
"model_dir": "trained_model_rcv1",
"data": {
"train_json_files": [
"data/rcv1_train.hierar.json"
],
"validate_json_files": [
"data/rcv1_dev.hierar.json"
],
"test_json_files": [
"data/rcv1_test.hierar.json"
],
"generate_dict_using_json_files": true,
"generate_dict_using_all_json_files": true,
"generate_dict_using_pretrained_embedding": false,
"generate_hierarchy_label": true,
"dict_dir": "dict_rcv1",
"num_worker": 4
},
"feature": {
"feature_names": [
"token"
],
"min_token_count": 2,
"min_char_count": 2,
"token_ngram": 0,
"min_token_ngram_count": 0,
"min_keyword_count": 0,
"min_topic_count": 2,
"max_token_dict_size": 1000000,
"max_char_dict_size": 150000,
"max_token_ngram_dict_size": 10000000,
"max_keyword_dict_size": 100,
"max_topic_dict_size": 100,
"max_token_len": 256,
"max_char_len": 1024,
"max_char_len_per_token": 4,
"token_pretrained_file": "",
"keyword_pretrained_file": ""
},
"train": {
"batch_size": 64,
"start_epoch": 1,
"num_epochs": 50,
"num_epochs_static_embedding": 0,
"decay_steps": 1000,
"decay_rate": 1.0,
"clip_gradients": 100.0,
"l2_lambda": 0.0,
"loss_type": "BCEWithLogitsLoss",
"sampler": "fixed",
"num_sampled": 5,
"visible_device_list": "0",
"hidden_layer_dropout": 0.5
},
"embedding": {
"type": "embedding",
"dimension": 64,
"region_embedding_type": "context_word",
"region_size": 5,
"initializer": "uniform",
"fan_mode": "FAN_IN",
"uniform_bound": 0.25,
"random_stddev": 0.01,
"dropout": 0.0
},
"optimizer": {
"optimizer_type": "Adam",
"learning_rate": 0.008,
"adadelta_decay_rate": 0.95,
"adadelta_epsilon": 1e-08
},
"TextCNN": {
"kernel_sizes": [
2,
3,
4
],
"num_kernels": 100,
"top_k_max_pooling": 1
},
"TextRNN": {
"hidden_dimension": 64,
"rnn_type": "GRU",
"num_layers": 1,
"doc_embedding_type": "Attention",
"attention_dimension": 16,
"bidirectional": true
},
"DRNN": {
"hidden_dimension": 5,
"window_size": 3,
"rnn_type": "GRU",
"bidirectional": true,
"cell_hidden_dropout": 0.1
},
"eval": {
"text_file": "data/rcv1_test.hierar.json",
"threshold": 0.5,
"dir": "eval_dir",
"batch_size": 1024,
"is_flat": true,
"top_k": 100,
"model_dir": "checkpoint_dir_rcv1/TextRNN_best"
},
"TextVDCNN": {
"vdcnn_depth": 9,
"top_k_max_pooling": 8
},
"DPCNN": {
"kernel_size": 3,
"pooling_stride": 2,
"num_kernels": 16,
"blocks": 2
},
"TextRCNN": {
"kernel_sizes": [
2,
3,
4
],
"num_kernels": 100,
"top_k_max_pooling": 1,
"hidden_dimension":64,
"rnn_type": "GRU",
"num_layers": 1,
"bidirectional": true
},
"Transformer": {
"d_inner": 128,
"d_k": 32,
"d_v": 32,
"n_head": 4,
"n_layers": 1,
"dropout": 0.1,
"use_star": true
},
"AttentiveConvNet": {
"attention_type": "bilinear",
"margin_size": 3,
"type": "advanced",
"hidden_size": 64
},
"HMCN": {
"hierarchical_depth": [0, 384, 384, 384, 384],
"global2local": [0, 4, 55, 43, 1]
},
"log": {
"logger_file": "log_test_rcv1_hierar",
"log_level": "warn"
}
}