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

test_sqlite_restoration_maxi_batch.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: b45e1facf02178a1ec430717031497bcb1a64944 (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
52
#!/bin/bash -x

# Exit on error
set -e

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

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

extra_opts="--seed 4444 --maxi-batch 20 --mini-batch 32 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4"
# Added because default options has changes
extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false"

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

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

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

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

test -e sqlite_maxi/model.npz
test -e sqlite_maxi_1.log

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

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

test -e sqlite_maxi/model.npz
test -e sqlite_maxi_2.log

cat sqlite_maxi_2.log | $MRT_TOOLS/strip-timestamps.sh | grep "Ep\. " | sed 's/ : Time.*//' > sqlite_maxi_2.out
cat sqlite_maxi_1.out sqlite_maxi_2.out > sqlite_maxi.out

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

# Exit with success code
exit 0