blob: 3bb3c639de40ba59d62d53bb21ac81d5fe4b86d5 (
plain)
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
|
#!/bin/bash -x
# Exit on error
set -e
# Test code goes here
rm -rf valid valid_script.temp
mkdir -p valid
$MRT_MARIAN/build/marian \
--seed 4444 --no-shuffle --maxi-batch 1 --maxi-batch-sort none --dim-rnn 64 --dim-emb 32 \
-m valid/model.npz -t train.1k.{de,en} -v vocab.{de,en}.yml \
--disp-freq 5 --valid-freq 15 --after-batches 50 \
--data-weighting train.1k.weights.txt --data-weighting-type sentence \
--valid-metrics cross-entropy valid-script --valid-script-path ./valid_script.sh \
--valid-sets $MRT_DATA/europarl.de-en/toy.bpe.{en,de} \
--valid-log valid/valid.log --log valid/train.log
test -e valid/model.npz
test -e valid/valid.log
test -e valid/train.log
$MRT_TOOLS/strip-timestamps.sh < valid/valid.log > valid.out
$MRT_TOOLS/extract-costs.sh < valid/train.log > train.out
$MRT_TOOLS/diff-nums.py valid.out valid.expected -p 1.99 -o valid.diff
$MRT_TOOLS/diff-nums.py train.out train.expected -p 1.99 -o train.diff
# Exit with success code
exit 0
|