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

test_encdec_depth.sh « nematus « models « training « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fd08c9dc95bb26687a5188900ab8d3ad8a476dd7 (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
#!/bin/bash

#####################################################################
# SUMMARY: Train a deep RNN model with Nematus-compatible GRU units
# AUTHOR: snukky
# TAGS: nematus
#####################################################################

# Exit on error
set -e

# Test code goes here
mkdir -p encdec_depth
rm -f encdec_depth/* encdec_depth.log

$MRT_MARIAN/marian \
    --type nematus --enc-cell gru-nematus --dec-cell gru-nematus \
    --enc-depth 4 --enc-cell-depth 4 --enc-type bidirectional --dec-depth 4 --dec-cell-base-depth 4 --dec-cell-high-depth 1 \
    --layer-normalization \
    --no-shuffle --seed 1111 --dim-emb 64 --dim-rnn 128 \
    -m encdec_depth/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{de,en} -v vocab.en.yml vocab.de.yml \
    --log encdec_depth.log --disp-freq 2 --after-batches 10

test -e encdec_depth/model.npz
test -e encdec_depth/model.npz.yml

cat encdec_depth.log | $MRT_TOOLS/extract-costs.sh > encdec_depth.out
$MRT_TOOLS/diff-nums.py encdec_depth.out encdec_depth.expected -p 3 -o encdec_depth.diff

# Exit with success code
exit 0