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

test_ce-sum.sh « cost-functions « training « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 735ebbc06fbd6ab53daece1464cc1998a1281f44 (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
#!/bin/bash -x

# Exit on error
set -e

# Test code goes here
rm -rf ce-sum ce-sum.log
mkdir -p ce-sum

$MRT_MARIAN/marian \
    --cost-type ce-sum \
    --seed 9999 \
    -m ce-sum/model.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \
    --disp-freq 2 --after-epochs 1 \
    --log ce-sum.log

test -e ce-sum/model.npz
test -e ce-sum.log

cat ce-sum.log | grep 'Ep\. 1 :' | $MRT_TOOLS/extract-costs.sh > ce-sum.out
$MRT_TOOLS/diff-nums.py ce-sum.out ce-sum.expected -p 2 -o ce-sum.diff

# Exit with success code
exit 0