Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_validation.sh « data-weighting « features « training « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e84c976e7e7c1281be2b7b272c57a7edc05750b9 (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
31
32
33
34
35
#!/bin/bash -x

#####################################################################
# SUMMARY:
# TAGS: dataweights
#####################################################################

# Exit on error
set -e

# Test code goes here
rm -rf valid valid_script.temp
mkdir -p valid

$MRT_MARIAN/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