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

test_tsv_train_shuffle_in_ram.sh « input-tsv « interface « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d6c20e7c008917cbc3ca2f4b6048909c6c6d1c43 (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 -x

#####################################################################
# SUMMARY: Train a model with shuffling-in-RAM training sentences from a TSV file
# TAGS: sentencepiece tsv train gcc5-fails
#####################################################################

# Exit on error
set -e

# Remove old artifacts and create working directory
rm -rf train_shuffle_ram train_shuffle_ram.{log,out,diff}
mkdir -p train_shuffle_ram

# Run marian command
$MRT_MARIAN/marian \
    --shuffle-in-ram --seed 1111 --dim-emb 32 --dim-rnn 64 --maxi-batch 10 --optimizer sgd \
    -m train_shuffle_ram/model.npz --tsv --tsv-fields 2 -t train.tsv -v $MRT_MODELS/rnn-spm/vocab.deen.{spm,spm} \
    --after-batches 20 --disp-freq 4 \
    --log train_shuffle_ram.log

# Check if files exist
test -e train_shuffle_ram/model.npz
test -e train_shuffle_ram.log

# Compare the current output with the expected output
cat train_shuffle_ram.log | $MRT_TOOLS/extract-costs.sh > train_shuffle_ram.out
$MRT_TOOLS/diff-nums.py train_shuffle_ram.out train_shuffle.expected -p 0.01 -o train_shuffle_ram.diff

# Exit with success code
exit 0