forked from epwalsh/nlp-models
-
Notifications
You must be signed in to change notification settings - Fork 0
/
copynet.json
88 lines (88 loc) · 1.92 KB
/
copynet.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
{
"dataset_reader": {
"target_namespace": "target_tokens",
"type": "copynet_seq2seq",
"source_token_indexers": {
"tokens": {
"type": "single_id",
"namespace": "source_tokens"
},
"token_characters": {
"type": "characters"
}
}
},
"vocabulary": {
"min_count": {
"source_tokens": 4,
"target_tokens": 4
}
},
"train_data_path": "data/greetings/train.tsv",
"validation_data_path": "data/greetings/validation.tsv",
"model": {
"type": "copynet_seq2seq",
"source_embedder": {
"tokens": {
"type": "embedding",
"vocab_namespace": "source_tokens",
"embedding_dim": 25,
"trainable": true
},
"token_characters": {
"type": "character_encoding",
"embedding": {
"embedding_dim": 10
},
"encoder": {
"type": "lstm",
"input_size": 10,
"hidden_size": 10,
"num_layers": 2,
"dropout": 0,
"bidirectional": true
}
}
},
"encoder": {
"type": "lstm",
"input_size": 45,
"hidden_size": 100,
"num_layers": 2,
"dropout": 0,
"bidirectional": true
},
"attention": {
"type": "bilinear",
"vector_dim": 200,
"matrix_dim": 200
},
"target_embedding_dim": 10,
"beam_size": 3,
"max_decoding_steps": 20,
"token_based_metric": {
"type": "token_sequence_accuracy"
}
},
"iterator": {
"type": "bucket",
"padding_noise": 0.0,
"batch_size" : 32,
"sorting_keys": [["source_tokens", "num_tokens"]]
},
"trainer": {
"optimizer": {
"type": "sgd",
"lr": 0.1
},
"learning_rate_scheduler": {
"type": "cosine",
"t_initial": 5,
"eta_mul": 0.9
},
"num_epochs": 10,
"cuda_device": 0,
"should_log_learning_rate": true,
"should_log_parameter_statistics": false
}
}