-
Notifications
You must be signed in to change notification settings - Fork 0
/
cnn_classifier.json
71 lines (71 loc) · 1.53 KB
/
cnn_classifier.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
{
"dataset_reader": {
"type": "sentiment_reader",
"token_indexers": {
"tokens": {
"type": "single_id",
"lowercase_tokens": false
},
"token_characters": {
"type": "characters"
}
}
},
"train_data_path": "/home/user_data/wangr/ws/demo/data/data.txt",
"validation_data_path": "/home/user_data/wangr/ws/demo/data/data.txt",
"trainer": {
"num_epochs": 1,
"grad_norm": 5.0,
"patience": 1,
"validation_metric": "+accuracy",
"cuda_device": 0,
"optimizer": {
"type": "adamax"
}
},
"iterator": {
"type": "basic",
"batch_size": 64
},
"model": {
"type": "cnn_classifier",
"dropout": 0.2,
"text_field_embedder": {
"tokens": {
"type": "embedding",
"embedding_dim": 300,
"trainable": false,
"padding_index": 0
},
"token_characters": {
"type": "character_encoding",
"dropout": 0.2,
"embedding": {
"embedding_dim": 100
},
"encoder": {
"type": "cnn",
"embedding_dim": 100,
"ngram_filter_sizes": [
2,3,4
],
"num_filters": 100
}
}
},
"aggregator": {
"type": "lstm",
"bidirectional": true,
"input_size": 600,
"hidden_size": 200,
"num_layers": 1
},
"classifier_feedforward": {
"input_dim": 400,
"num_layers": 2,
"hidden_dims": [200, 3],
"activations": ["relu", "linear"],
"dropout": [0.3, 0.0]
}
}
}