summaryrefslogtreecommitdiff
path: root/training/dtrain/examples/toy
diff options
context:
space:
mode:
Diffstat (limited to 'training/dtrain/examples/toy')
-rw-r--r--training/dtrain/examples/toy/dtrain.ini13
-rw-r--r--training/dtrain/examples/toy/expected-output88
-rw-r--r--training/dtrain/examples/toy/in2
-rw-r--r--training/dtrain/examples/toy/src2
-rw-r--r--training/dtrain/examples/toy/tgt2
-rw-r--r--training/dtrain/examples/toy/weights4
6 files changed, 47 insertions, 64 deletions
diff --git a/training/dtrain/examples/toy/dtrain.ini b/training/dtrain/examples/toy/dtrain.ini
index ef956df7..378224b8 100644
--- a/training/dtrain/examples/toy/dtrain.ini
+++ b/training/dtrain/examples/toy/dtrain.ini
@@ -1,13 +1,8 @@
decoder_config=cdec.ini
-input=src
-refs=tgt
-output=-
-print_weights=logp shell_rule house_rule small_rule little_rule PassThrough PassThrough_1 PassThrough_2 PassThrough_3 PassThrough_4 PassThrough_5 PassThrough_6
+bitext=in
+output=weights
k=4
N=4
-epochs=2
-scorer=bleu
-sample_from=kbest
-filter=uniq
-pair_sampling=all
+iterations=2
learning_rate=1
+print_weights=logp shell_rule house_rule small_rule little_rule PassThrough PassThrough_1 PassThrough_2 PassThrough_3 PassThrough_4 PassThrough_5 PassThrough_6
diff --git a/training/dtrain/examples/toy/expected-output b/training/dtrain/examples/toy/expected-output
index 1da2aadd..8c758d00 100644
--- a/training/dtrain/examples/toy/expected-output
+++ b/training/dtrain/examples/toy/expected-output
@@ -1,77 +1,63 @@
-Warning: hi_lo only works with pair_sampling XYX.
- cdec cfg 'cdec.ini'
-Seeding random number sequence to 1664825829
-
dtrain
Parameters:
k 4
N 4
T 2
- scorer 'bleu'
- sample from 'kbest'
- filter 'uniq'
learning rate 1
- gamma 0
- loss margin 0
- pairs 'all'
- pair threshold 0
- select weights 'last'
- l1 reg 0 'none'
- max pairs 4294967295
- cdec cfg 'cdec.ini'
- input 'src'
- refs 'tgt'
- output '-'
-(a dot represents 10 inputs)
+ error margin 0
+ l1 reg 0
+ decoder conf 'cdec.ini'
+ input 'in'
+ output 'weights'
+(a dot per input)
Iteration #1 of 2.
- 2
+ ... 2
WEIGHTS
logp = +0
- shell_rule = -1
- house_rule = +2
- small_rule = -2
+ shell_rule = +0
+ house_rule = +3
+ small_rule = +0
little_rule = +3
- PassThrough = -5
+ PassThrough = -15
+ PassThrough_1 = +0
+ PassThrough_2 = +0
+ PassThrough_3 = +0
+ PassThrough_4 = +0
+ PassThrough_5 = +0
+ PassThrough_6 = +0
---
- 1best avg score: 0.5 (+0.5)
- 1best avg model score: 2.5 (+2.5)
- avg # pairs: 4
- avg # rank err: 1.5
- avg # margin viol: 0
- non0 feature count: 6
+ 1best avg score: 0.40937 (+0.40937)
+ 1best avg model score: 3
+ avg # pairs: 2.5
+ non-0 feature count: 4
avg list sz: 4
avg f count: 2.875
(time 0 min, 0 s/S)
Iteration #2 of 2.
- 2
+ ... 2
WEIGHTS
logp = +0
- shell_rule = -1
- house_rule = +2
- small_rule = -2
+ shell_rule = +0
+ house_rule = +3
+ small_rule = +0
little_rule = +3
- PassThrough = -5
+ PassThrough = -15
+ PassThrough_1 = +0
+ PassThrough_2 = +0
+ PassThrough_3 = +0
+ PassThrough_4 = +0
+ PassThrough_5 = +0
+ PassThrough_6 = +0
---
- 1best avg score: 1 (+0.5)
- 1best avg model score: 5 (+2.5)
- avg # pairs: 5
- avg # rank err: 0
- avg # margin viol: 0
- non0 feature count: 6
+ 1best avg score: 0.81873 (+0.40937)
+ 1best avg model score: 6
+ avg # pairs: 0
+ non-0 feature count: 4
avg list sz: 4
avg f count: 3
(time 0 min, 0 s/S)
-Writing weights file to '-' ...
-house_rule 2
-little_rule 3
-Glue -4
-PassThrough -5
-small_rule -2
-shell_rule -1
-done
-
---
-Best iteration: 2 [SCORE 'bleu'=1].
+Best iteration: 2 [GOLD = 0.81873].
This took 0 min.
diff --git a/training/dtrain/examples/toy/in b/training/dtrain/examples/toy/in
new file mode 100644
index 00000000..5d70795d
--- /dev/null
+++ b/training/dtrain/examples/toy/in
@@ -0,0 +1,2 @@
+ich sah ein kleines haus ||| i saw a little house
+ich fand ein kleines haus ||| i found a little house
diff --git a/training/dtrain/examples/toy/src b/training/dtrain/examples/toy/src
deleted file mode 100644
index 87e39ef2..00000000
--- a/training/dtrain/examples/toy/src
+++ /dev/null
@@ -1,2 +0,0 @@
-ich sah ein kleines haus
-ich fand ein kleines haus
diff --git a/training/dtrain/examples/toy/tgt b/training/dtrain/examples/toy/tgt
deleted file mode 100644
index 174926b3..00000000
--- a/training/dtrain/examples/toy/tgt
+++ /dev/null
@@ -1,2 +0,0 @@
-i saw a little house
-i found a little house
diff --git a/training/dtrain/examples/toy/weights b/training/dtrain/examples/toy/weights
new file mode 100644
index 00000000..f6f32772
--- /dev/null
+++ b/training/dtrain/examples/toy/weights
@@ -0,0 +1,4 @@
+house_rule 3
+little_rule 3
+Glue -12
+PassThrough -15