forked from marian-nmt/wmt16-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-me.sh
executable file
·43 lines (35 loc) · 927 Bytes
/
run-me.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash -v
if [ ! -e "mosesdecoder" ]
then
git clone https://github.com/moses-smt/mosesdecoder
fi
if [ ! -e "subword-nmt" ]
then
git clone https://github.com/rsennrich/subword-nmt
fi
if [ ! -e "data/ro-en.tgz" ]
then
./scripts/download-files.sh
fi
mkdir model
if [ ! -e "data/corpus.bpe.en" ]
then
./scripts/preprocess.sh
fi
if [ ! -e "model/model.iter90000.npz" ]
then
../../build/marian \
--model model/model.npz \
--devices 0 \
--train-sets data/corpus.bpe.ro data/corpus.bpe.en \
--vocabs model/vocab.ro.yml model/vocab.en.yml \
--dim-vocabs 50000 50000 \
--mini-batch 80 \
--layer-normalization \
--after-batches 90000 \
--valid-freq 10000 --save-freq 30000 --disp-freq 1000 \
--valid-sets data/newsdev2016.bpe.ro data/newsdev2016.bpe.en \
--valid-metrics cross-entropy valid-script \
--valid-script-path ./scripts/validate.sh \
--log model/train.log --valid-log model/valid.log
fi