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

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

# Exit on error
set -e

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

$MRT_MARIAN/marian \
    --no-shuffle --seed 888 --mini-batch 4 --maxi-batch 1 --maxi-batch-sort none \
    --dim-rnn 64 --dim-emb 32 --learn-rate 0.1 \
    --devices 0 --sync-sgd --optimizer sgd \
    -m sync_sgd_1gpu/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} -v vocab.en.yml vocab.de.yml \
    --disp-freq 5 --save-freq 10 --after-batches 20 \
    --log sync_sgd_1gpu.log

test -e sync_sgd_1gpu/model.npz
test -e sync_sgd_1gpu.log

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

# Exit with success code
exit 0