-
Notifications
You must be signed in to change notification settings - Fork 6
/
xnmt-config.yaml
61 lines (56 loc) · 1.64 KB
/
xnmt-config.yaml
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
model-ensemble3: !Experiment
exp_global: &exp_global !ExpGlobal
model_file: '<<TMPDIR>>/{EXP}.mod'
log_file: '<<TMPDIR>>/{EXP}.log'
default_layer_dim: 300
dropout: 0.2
model: !DefaultTranslator
src_reader: !PlainTextReader
_xnmt_id: the_src_reader
vocab: !Vocab {vocab_file: "<<TMPDIR>>/train.src.vocab"}
trg_reader: !PlainTextReader
_xnmt_id: the_trg_reader
vocab: !Vocab {vocab_file: "<<TMPDIR>>/train.trg.vocab"}
src_embedder: !SimpleWordEmbedder
emb_dim: 60
encoder: !BiLSTMSeqTransducer
layers: 1
input_dim: 60
hidden_dim: 300
attender: !MlpAttender
hidden_dim: 300
trg_embedder: !SimpleWordEmbedder
emb_dim: 60
decoder: !MlpSoftmaxDecoder
rnn_layer: !UniLSTMSeqTransducer
layers: 1
trg_embed_dim: 60
mlp_layer: !MLP
hidden_dim: 300
bridge: !CopyBridge {}
train: !SimpleTrainingRegimen
batcher: !SentShuffleBatcher
batch_size: 25
trainer: !AdamTrainer
alpha: 0.001
run_for_epochs: 1000
lr_decay: 0.01
lr_decay_times: 0
patience: 5
src_file: "<<TMPDIR>>/train.src"
trg_file: "<<TMPDIR>>/train.trg"
dev_tasks:
- !AccuracyEvalTask
eval_metrics: accuracy
src_file: "<<TMPDIR>>/dev.src"
ref_file: "<<TMPDIR>>/dev.trg"
hyp_file: "<<TMPDIR>>/dev.hyp"
evaluate: &evaluate
- !AccuracyEvalTask
eval_metrics: accuracy
src_file: "<<TMPDIR>>/dev.src"
ref_file: "<<TMPDIR>>/dev.trg"
hyp_file: "<<TMPDIR>>/dev.predictions"
inference: !SimpleInference
search_strategy: !BeamSearch
beam_size: 5