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

test_mnist_ffnn.sh « mnist « examples « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 799e8a90f10210af56f2d80ce6492b241a453f1e (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
#!/bin/bash

# Exit on error
set -e

# Remove any files, etc.
clean_up() {
    rm -f train.log
}
trap clean_up EXIT

# Test code goes here
$MRT_MARIAN/build/mnist_example \
    --after-epochs 20 --mini-batch 200 --valid-freq 600 --maxi-batch 1 \
    --train-sets train-images-idx3-ubyte train-labels-idx1-ubyte \
    --valid-sets t10k-images-idx3-ubyte t10k-labels-idx1-ubyte \
    --seed 12345 \
    --log train.log

cat train.log | grep '\[valid\]' | sed -re 's/.*\[valid\] //' -e 's/ : (new|stalled).*//' > ffnn.out
$MRT_TOOLS/diff-nums.py ffnn.out ffnn.expected -p 0.005 > ffnn.diff

# Exit with success code
exit 0