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

github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-10-26 16:21:35 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-10-26 16:21:35 +0300
commit7ab948b3c22040a11f9e4de2ae330fe005eab14e (patch)
treea73204ef5433f7eb455b20f4670d997b2403c123 /tests/training/model-types
parent6c160e145a61adbc096ad03e463b5812d20ca48b (diff)
Add test checking if amun model has decoder_c_tt
Diffstat (limited to 'tests/training/model-types')
-rw-r--r--tests/training/model-types/.gitignore1
-rw-r--r--tests/training/model-types/test_amun_has_decoder_c_tt.sh22
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/training/model-types/.gitignore b/tests/training/model-types/.gitignore
index 2742094..9a5cf30 100644
--- a/tests/training/model-types/.gitignore
+++ b/tests/training/model-types/.gitignore
@@ -1 +1,2 @@
transformer
+decoder_c_tt
diff --git a/tests/training/model-types/test_amun_has_decoder_c_tt.sh b/tests/training/model-types/test_amun_has_decoder_c_tt.sh
new file mode 100644
index 0000000..fb44930
--- /dev/null
+++ b/tests/training/model-types/test_amun_has_decoder_c_tt.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -x
+
+# Exit on error
+set -e
+
+# Test code goes here
+rm -rf decoder_c_tt
+mkdir -p decoder_c_tt
+
+opts="--no-shuffle --seed 1111 --mini-batch 32 --maxi-batch 1 --maxi-batch-sort none --optimizer sgd --dim-emb 64 --dim-rnn 128"
+
+$MRT_MARIAN/build/marian \
+ -m decoder_c_tt/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} -v vocab.en.yml vocab.de.yml \
+ $opts --after-batches 1
+
+test -e decoder_c_tt/model.npz
+
+python $MRT_MARIAN/scripts/contrib/model_info.py -m decoder_c_tt/model.npz > decoder_c_tt.out
+grep -q "decoder_c_tt" decoder_c_tt.out
+
+# Exit with success code
+exit 0