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

test_factors.sh « factors « decoder « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ccda2c6b56fa2de0ba4e8a8b057371a0928128de (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
#/bin/bash -x

#####################################################################
# SUMMARY: Tests decoding with factors
# AUTHOR: pedrodiascoelho
# TAGS: factors
#####################################################################

# Exit on error
set -e

# Remove old artifacts
rm -f factors.{out,diff,log}

# Run marian decoder
$MRT_MARIAN/marian-decoder -c $MRT_MODELS/factors/model.npz.decoder.yml --log factors.log < text.in > factors.out

#checks factors usage
grep -q "Factored embeddings enabled" factors.log
grep -q "Factored outputs enabled" factors.log

# Compare the output with the expected output
$MRT_TOOLS/diff.sh factors.out factors.expected > factors.diff

# Exit with success code
exit 0