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

test_ce-mean-words.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: b9bb8f57223a1048b7a690ec365cef913844a8b3 (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

#####################################################################
# SUMMARY: Train using the 'ce-mean-words' cost function
# AUTHOR: snukky
# TAGS: gcc5-fails sync-sgd
#####################################################################

# Exit on error
set -e

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

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

test -e ce-mean-words/model.npz
test -e ce-mean-words.log

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

# Exit with success code
exit 0