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

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

#####################################################################
# SUMMARY:
# TAGS: dataweights
#####################################################################

# Exit on error
set -e

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

$MRT_MARIAN/marian \
    --seed 1111 --no-shuffle --maxi-batch 1 --maxi-batch-sort none --max-length 100 --dim-emb 128 --dim-rnn 256 --optimizer sgd \
    -m sqlite/model.npz -t train.1k.{de,en} -v vocab.{de,en}.yml \
    --log sqlite.log --disp-freq 1 --after-batches 100 --mini-batch 1 \
    --data-weighting train.1k.weights.txt --data-weighting-type sentence --sqlite sqlite/corpus.sqlite3

test -e sqlite/model.npz
test -e sqlite/corpus.sqlite3
test -e sqlite.log

cat sqlite.log | $MRT_TOOLS/extract-costs.sh > sqlite.out

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

# Exit with success code
exit 0