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

test_corpus_restoration_no_shuffle.sh « corpus « restoring « training « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 63105e4a07d577bcfcae766f6576646fe071786a (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash -x

# Exit on error
set -e

# Test code goes here
rm -rf corpus_noshuf corpus_noshuf*.log
mkdir -p corpus_noshuf

test -e vocab.de.yml
test -e vocab.en.yml

extra_opts="--seed 1234 --no-shuffle --maxi-batch 8 --maxi-batch-sort src --mini-batch 32 --mini-batch-fit -w 100 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4"

$MRT_MARIAN/marian \
    -m corpus_noshuf/model_full.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \
    --after-batches 80 $extra_opts \
    --log corpus_noshuf.log

test -e corpus_noshuf/model_full.npz
test -e corpus_noshuf.log

cat corpus_noshuf.log | $MRT_TOOLS/strip-timestamps.sh | grep "Ep\. " | sed 's/ : Time.*//' > corpus_noshuf.expected

$MRT_MARIAN/marian \
    -m corpus_noshuf/model.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \
    --after-batches 60 $extra_opts \
    --log corpus_noshuf_1.log

test -e corpus_noshuf/model.npz
test -e corpus_noshuf_1.log

cat corpus_noshuf_1.log | $MRT_TOOLS/strip-timestamps.sh | grep "Ep\. " | sed 's/ : Time.*//' > corpus_noshuf_1.out
cp corpus_noshuf/model.npz.yml corpus_noshuf/model.npz.1.yml
cp corpus_noshuf/model.npz.progress.yml corpus_noshuf/model.npz.progress.1.yml

$MRT_MARIAN/marian \
    -m corpus_noshuf/model.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \
    --after-batches 80 $extra_opts \
    --log corpus_noshuf_2.log

test -e corpus_noshuf/model.npz
test -e corpus_noshuf_2.log

cat corpus_noshuf_2.log | $MRT_TOOLS/strip-timestamps.sh | grep "Ep\. " | sed 's/ : Time.*//' > corpus_noshuf_2.out
cat corpus_noshuf_1.out corpus_noshuf_2.out > corpus_noshuf.out

$MRT_TOOLS/diff-nums.py corpus_noshuf.out corpus_noshuf.expected -p 0.1 -o corpus_noshuf.diff

# Exit with success code
exit 0