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

test_hard_aligns_cpu.sh « transformer « models « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cc1a48c123d23be19fd2781c93db2887c7f688d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

#####################################################################
# SUMMARY: Check word alignment generated from a Transformer on CPU
# TAGS: cpu align transformer
#####################################################################

# Exit on error
set -e

# Skip if no MKL found
if [ ! $MRT_MARIAN_USE_MKL ]; then
    exit 100
fi

rm -f hardalign.cpu.out

# Run Marian
$MRT_MARIAN/marian-decoder -c $MRT_MODELS/transformer/decode.yml -b 3 --mini-batch 32 --alignment --cpu-threads 2 < text.in > hardalign.cpu.out
$MRT_TOOLS/diff.sh hardalign.cpu.out text.b3.hardalign.expected > hardalign.cpu.diff

# Exit with success code
exit 0