forked from Gastron/sb-fin-parl-2015-2020-kevat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-e2e.sh
79 lines (66 loc) · 2.42 KB
/
run-e2e.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
set -eu
stage=3
. path.sh
. cmd.sh
. utils/parse_options.sh
if [ $stage -le 3 ]; then
local/chain_e2e/build_new_tree.sh \
--type biphone \
--min_biphone_count 100 \
--min_monophone_count 10 \
--tie true \
kaldi-s5/data/parl2015-2020-train/ \
kaldi-s5/data/lang_chain \
exp/chain_e2e/tree
fi
num_units=$(tree-info exp/chain_e2e/tree/tree | grep "num-pdfs" | cut -d" " -f2)
seed=2602
if [ $stage -le 5 ]; then
local/prepare_graph_clustered.sh \
--dataroot kaldi-s5/data/ \
--train_set parl2015-2020-train \
--valid_set parl-dev-all-fixed \
--lang kaldi-s5/data/lang_chain \
--tree_dir exp/chain_e2e/tree \
--graph exp/chain_e2e/graph
fi
if [ $stage -le 6 ]; then
local/chain_e2e/run-training.sh \
--treedir exp/chain_e2e/tree \
--hparams "hyperparams/lfmmi/New-CRDNN-J-e2e.yaml"
fi
if [ $stage -le -999 ]; then
# Document how the non Flat Start LF-MMI-only model was trained:
local/chain_e2e/run-training.sh \
--treedir kaldi-s5/exp/chain/tree/ \
--hparams "hyperparams/lfmmi/New-CRDNN-J-e2e-nonflat.yaml"
local/chain-decode.sh \
--hparams hyperparams/lfmmi/New-CRDNN-J-e2e-nonflat.yaml \
--decodedir exp/lfmmi-am/New-CRDNN-J-nonflat/${seed}-${num_units}units/decode_parl-dev-all-fixed_varikn.bpe1750.d0.0001_acwt1.3 \
--py_script "test-lfmmi-fbank.py"
fi
if [ $stage -le 7 ]; then
utils/mkgraph.sh --self-loop-scale 1.0 kaldi-s5/data/lang_test_varikn.bpe1750.d0.0001/ exp/chain_e2e/graph exp/chain_e2e/graph/graph_varikn.bpe1750.d0.0001
fi
if [ $stage -le 8 ]; then
local/chain-decode.sh \
--tree exp/chain_e2e/tree \
--graphdir exp/chain_e2e/graph/graph_varikn.bpe1750.d0.0001/ \
--hparams hyperparams/lfmmi/New-CRDNN-J-e2e.yaml \
--decodedir exp/lfmmi-am/New-CRDNN-J/${seed}-${num_units}units/decode_parl-dev-all-fixed_varikn.bpe1750.d0.0001_acwt1.3 \
--py_script "test-lfmmi-fbank.py"
fi
if [ $stage -le 9 ]; then
local/chain_e2e/run-training.sh \
--treedir exp/chain_e2e/tree \
--hparams "hyperparams/lfmmi/New-CRDNN-J-e2e-contd.yaml"
fi
if [ $stage -le 10 ]; then
local/chain-decode.sh \
--tree exp/chain_e2e/tree \
--graphdir exp/chain_e2e/graph/graph_varikn.bpe1750.d0.0001/ \
--hparams hyperparams/lfmmi/New-CRDNN-J-e2e-contd.yaml \
--decodedir exp/lfmmi-am/New-CRDNN-J-contd/${seed}-${num_units}units/decode_parl-dev-all-fixed_varikn.bpe1750.d0.0001_acwt1.3 \
--py_script "test-lfmmi-fbank.py"
fi