Commit 325bd02f authored by Guoguo Chen's avatar Guoguo Chen
Browse files

trunk: re-creating s5c (copying from the latest s5b scripts). All further...

trunk: re-creating s5c (copying from the latest s5b scripts). All further Babel changes should be made into s5c so that s5b can reflect JHU's Babel performance in April, 2014.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4541 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 5a8b0ada
#!/bin/bash
#This is an example sequence of commands for running the default Kaldi Babel OP1 system
#It is not assumed that you will run it as a script, even though you can try :)
./run-1-main.sh
./run-2a-nnet-ensemble-gpu.sh
./run-2b-bnf.sh --semisupervised false --ali-dir exp/tri5_ali/
./run-3b-bnf-sgmm.sh --semisupervised false
./run-3b-bnf-nnet.sh --semisupervised false
##Training of the automatic segmenter
./run-2-segmentation.sh
##Decoding the automatic segmentation of dev2h subset. dev2h.pem would mean decoding
##the dev2h subset using the officialy provided segmentation.
##Also possible to run dev10h.pem, dev10h.uem, dev10h.seg and so on...
./run-4-anydecode.sh --dir dev2h.seg
./run-4b-anydecode-bnf.sh --dir dev2h.seg --semisupervised false --extra-kws true
##Decoding of the unsupervivsed data
./run-4-anydecode.sh --dir unsup.seg --skip-kws true --skip-stt true
./run-4b-anydecode-bnf.sh --dir unsup.seg --skip-kws true --skip-stt true --semisupervised false
##Get the one-best path and the weights for frame-weighting of posteriors
./local/best_path_weights.sh --cmd "$train_cmd" data/unsup.seg/ data/lang \
exp/tri6b_nnet/decode_unsup.seg/ \
exp/sgmm5_mmi_b0.1/decode_fmllr_unsup.seg_it1/ \
exp_bnf/sgmm7_mmi_b0.1/decode_fmllr_unsup.seg_it1 \
exp_bnf/tri7_nnet/decode_unsup.seg \
exp_bnf_semisup/best_path_weights/unsup.seg
##Semisupervised bottleneck system training (initial setup)
./run-2b-bnf.sh --semisupervised true --ali-model exp/tri6b_nnet/ \
--weights-dir exp/best_path_weights/unsup.seg/decode_unsup.seg/
##Semisup training, SGMM+bMMI on the top of the BN features
./run-3b-bnf-sgmm.sh --semisupervised true
##Semisup training, pNorm DNN on the top of the BN features
./run-3b-bnf-nnet.sh --semisupervised true
##And decoding again. We decode the unsup.seg again to do the second run of the
##semisupervised training
./run-4b-anydecode-bnf.sh --dir dev2h.seg --semisupervised true --extra-kws true
./run-4b-anydecode-bnf.sh --dir unsup.seg --skip-kws true --skip-stt true --semisupervised true
##One-best output and frame weights for the second run of the semisup training
./local/best_path_weights.sh --cmd "$train_cmd" data/unsup.seg/ data/lang \
exp_bnf_semisup/sgmm7_mmi_b0.1/decode_fmllr_unsup.seg_it1 \
exp_bnf_semisup/tri7_nnet/decode_unsup.seg \
exp/tri6b_nnet/decode_unsup.seg/ \
exp/sgmm5_mmi_b0.1/decode_fmllr_unsup.seg_it1/ \
exp_bnf/sgmm7_mmi_b0.1/decode_fmllr_unsup.seg_it1 \
exp_bnf/tri7_nnet/decode_unsup.seg \
exp_bnf_semisup2/best_path_weights/unsup.seg
##Second run of the semisup training
./run-2b-bnf.sh --unsup-string "_semisup2" --semisupervised true --ali-model exp/tri6b_nnet/ \
--weights-dir exp_bnf_semisup2/best_path_weights/unsup.seg/decode_fmllr_unsup.seg_it1/
./run-3b-bnf-sgmm.sh --semisupervised true --unsup_string "_semisup2"
./run-3b-bnf-nnet.sh --semisupervised true --unsup_string "_semisup2"
##Decode again to see if we got an improvement
./run-4b-anydecode-bnf.sh --dir dev2h.seg --semisupervised true --unsup_string "_semisup2" --extra-kws true
##Decoding of the dev10h (all systems, all stages)
./run-4-anydecode.sh --dir dev10h.seg --extra-kws true
./run-4b-anydecode-bnf.sh --dir dev10h.seg --semisupervised false --extra-kws true
./run-4b-anydecode-bnf.sh --dir dev10h.seg --semisupervised true --extra-kws true
./run-4b-anydecode-bnf.sh --dir dev10h.seg --semisupervised true --extra-kws true --unsup_string "_semisup2"
##Decoding of the shadow.seg (combination of dev10h.seg and eval.seg)
##We did this for eval run as a kind of "sanity check" -- we check the shadow.seg/dev10h.seg subset
##performance vs the standalone dev10h.seg performance to catch (hopefully) possible problems
./run-4-anydecode.sh --dir shadow.seg --extra-kws true
./run-4b-anydecode-bnf.sh --dir shadow.seg --semisupervised false --extra-kws true
./run-4b-anydecode-bnf.sh --dir shadow.seg --semisupervised true --extra-kws true
./run-4b-anydecode-bnf.sh --dir shadow.seg --semisupervised true --extra-kws true --unsup_string "_semisup2"
#This prepares for separation/split of the shadow dataset into the devset, which we can evaluate
# and the eval set, which we will submit
#Note: we do this only once, for ./data, as we do not really need anything else
#just the file lists...
#NB: there was a oversight in one of the scripts that was causing thectm files contain
#BN: incorrect channel info (A instead of 1)
#NB: To fix that, you can run something like this:
#NB: find exp/ -name "shadow.seg.ctm" | xargs -t -n 1 sed -i'.bakx' 's/ A / 1 /g'
./local/nist_eval/create_compound_set.sh --evlset eval.seg --devset dev10h.seg --tgtdir data/shadow.seg
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg dev10h.seg exp/tri6b_nnet/decode_shadow.seg
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg eval.seg exp/tri6b_nnet/decode_shadow.seg
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg dev10h.seg exp/sgmm5_mmi_b0.1/decode_*shadow.seg*
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg eval.seg exp/sgmm5_mmi_b0.1/decode_*shadow.seg*
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg dev10h.seg exp_bnf/sgmm7_mmi_b0.1/decode_*shadow.seg*
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg eval.seg exp_bnf/sgmm7_mmi_b0.1/decode_*shadow.seg*
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg dev10h.seg exp_bnf_semisup/sgmm7_mmi_b0.1/decode_*shadow.seg*
./local/nist_eval/filter_data.sh --cmd "$decode_cmd" data/shadow.seg eval.seg exp_bnf_semisup/sgmm7_mmi_b0.1/decode_*shadow.seg*
#The following commands will actually do two things
#a) looking at the performance of the dataset --master <dataset> they will figure out the correct LMW
#b) symlink the appropriate evaluation result file under the correct EXPID into the ./release directory
#Warning: it's a lot of files so it's easy to get confused!
./local/nist_eval/make_release.sh --dryrun false --dir exp/sgmm5_mmi_b0.1 --data data/shadow.seg --master dev10h.seg lang.conf ./release
./local/nist_eval/make_release.sh --dryrun false --dir exp/tri6b_nnet --data data/shadow.seg --master dev10h.seg lang.conf ./release
./local/nist_eval/make_release.sh --dryrun false --dir exp_bnf/sgmm7_mmi_b0.1 --data data/shadow.seg --master dev10h.seg lang.conf ./release
./local/nist_eval/make_release.sh --dryrun false --dir exp_bnf_semisup/sgmm7_mmi_b0.1 --extrasys SEMISUPX --data data/shadow.seg --master dev10h.seg lang.conf ./release
#Combine results (what we call 4way-combo)
How to setup the BABEL database training environment
====================================================
a) Preparation: you need to make sure the BABEL data and the F4DE scoring software
is set up as it is in JHU, or change this setup accordingly. This will probably
be hard and will involve some trial and error. Some relevant pathnames can be
found in conf/lang/* and ./path.sh
Link one of the config files in conf/languages to ./lang.conf. E.g.:
ln -s conf/languages/105-turkish-limitedLP.official.conf lang.conf
b) If you plan to work on one or more languages, the following approach is advised.
aa) create empty directory somewhere according to your choice
(
mkdir 206-zulu-llp; cd 206-zulu-llp
)
ab) copy cmd.sh and path.sh (you will probably need to do some changes in these)
especially pay attention to KALDI_ROOT in path.sh and possibly switch to using
run.pl in cmd.sh
(
cp /path/to/kaldi/egs/babel/s5b/{cmd.sh,path.sh} .
)
ac) symlink all the directories here to that directory
(
ln -s /path/to/kaldi/egs/babel/s5b/{conf,steps,utils,local} .
)
ad) link the necessary scripts ( see below )
{
ln -s /path/to/kaldi/egs/babel/s5b/run-1-main.sh .
}
ae) link the appropriate language-specific config file to lang.conf in
each directory.
(
206-zulu-llp$ ln -s conf/lang/206-zulu-limitedLP.official.conf lang.conf
)
Running the training scripts
===================================================
You run the scripts in order, i.e.
run-1-main.sh
run-2a-nnet.sh and run-2-bnf.sh may be run in parallel, but run-2-bnf.sh should be
run on a machine that has a GPU.
run-3-bnf-system.sh trains an SGMM system on top of bottleneck features from run-2-bnf.sh
run-4-test.sh is decoding with provided segmentation (we get this from CMU)
run-5-anydecode.sh seems to be decoding with the segmentation provided
Official NIST submission preparation
==================================================
The make_release.sh script might come handy.
The scripts evaluates the performance of the sgmm2_mmi_b.0.1 system on
the eval.uem dataset and chooses the same set of parameters to
determine the path inside the test.uem dataset.
./make_release.sh --relname defaultJHU --lp FullLP --lr BaseLR --ar NTAR \
conf/languages/106-tagalog-fullLP.official.conf /export/babel/data/releases
./run-1-main.sh
./run-2a-nnet-ensemble-gpu.sh
./run-2b-bnf.sh --semisupervised false --ali-dir exp/tri5_ali/
./run-3b-bnf-sgmm.sh --semisupervised false
./run-3b-bnf-nnet.sh --semisupervised false
./run-2-segmentation.sh
./run-4-anydecode.sh --dir dev2h.seg
./run-4b-anydecode-bnf.sh --dir dev2h.seg --semisupervised false --extra-kws true
./run-4-anydecode.sh --dir unsup.seg --skip-kws true --skip-stt true
./run-4b-anydecode-bnf.sh --dir unsup.seg --skip-kws true --skip-stt true --semisupervised false
The results are by default to be found in <your-decode_directory>/decode_* where the individual <your-decode_directory>/decode_* directory correspond to the language model weight.
An easthetically pleasing table with the results can be obtained for example like this (YMMV, as well as your aesthetic feeling):
find exp/sgmm5_mmi_b0.1 -name "*.ctm.sys" -not -name "*char.ctm.sys" -ipath "*fmllr_eval.pem*" | xargs grep 'Sum/Avg' | sed 's/:* *| */ /g' | sed 's/ */ /g' | sort -n -k 9 | column -t
similarly, for the kws outputs, the same table can be obtained as
find exp/sgmm5_mmi_b0.1 -name "sum.txt" -ipath "*fmllr_eval.pem*" | xargs grep "| Occurrence" | cut -f 1,13 -d '|'| sed 's/:|//g' | column -t | sort -k 2 -n -r
This diff is collapsed.
# "queue.pl" uses qsub. The options to it are
# options to qsub. If you have GridEngine installed,
# change this to a queue you have access to.
# Otherwise, use "run.pl", which will run jobs locally
# (make sure your --num-jobs options are no more than
# the number of cpus on your machine.
#a) JHU cluster options
export train_cmd="queue.pl -l arch=*64"
export decode_cmd="queue.pl -l arch=*64,mem_free=2G,ram_free=2G"
export mkgraph_cmd="queue.pl -l arch=*64,ram_free=4G,mem_free=4G"
#export cuda_cmd="..."
#b) BUT cluster options
#export train_cmd="queue.pl -q all.q@@blade -l ram_free=1200M,mem_free=1200M"
#export decode_cmd="queue.pl -q all.q@@blade -l ram_free=1700M,mem_free=1700M"
#export decodebig_cmd="queue.pl -q all.q@@blade -l ram_free=4G,mem_free=4G"
#export cuda_cmd="queue.pl -q long.q@@pco203 -l gpu=1"
#export cuda_cmd="queue.pl -q long.q@pcspeech-gpu"
#export mkgraph_cmd="queue.pl -q all.q@@servers -l ram_free=4G,mem_free=4G"
#c) run it locally...
#export train_cmd=run.pl
#export decode_cmd=run.pl
#export cuda_cmd=run.pl
#export mkgraph_cmd=run.pl
#################################################
## PTDNN - Python Toolkit for Deep Neural Network
## Author: Yajie Miao
#################################################
import os
import sys
from utils.learn_rates import LearningRateExpDecay
class BnfExpConfig(object):
def __init__(self):
# working directory; by default, the pfiles should be here
self.wdir = "WORK/"
self.pretrain_data = self.wdir + 'train.pfile.gz' # pretraining data
self.pretrain_output = self.wdir + "rbm.ptr" # pretraining output
# finetuning data
self.finetune_train_data = self.wdir + 'train.pfile.gz' # finetune training data
self.finetune_valid_data = self.wdir + 'valid.pfile.gz' # finetune validation data
self.finetune_output = self.wdir + "final.nnet.raw" # finetune output
self.nnet_kaldi_fmt = self.wdir + "final.nnet"
# global config for nnet topo
self.n_ins=250 # size of input data
self.n_outs=N_OUTS # number of output targets.. we'll replace this with
# the correct number when we move this to the right place.
self.hidden_layers_sizes=[1024, 1024, 1024, 1024, 1024, 42, 1024] # hidden layer sizes
self.bnf_layer_index = 6 # the index of the Bottleneck layer
self.pretrain_layer_num = 5 # number of hidden layers to be pretrained
# global config for data
self.shuffle = True
self.chunk_size = '200m'
# pretraining batch size
self.pretrain_batch_size = 128 # batch-size in pretraining
# pretraining schedule
self.pretrain_gbrbm_lr = 0.005 # learning rate for Gaussian-Bernoulli RBM
self.pretrain_rbm_lr = 0.08 # learning rate for Bernoulli-Bernoulli RBM
self.initial_momentum = 0.5 # initial momentum
self.final_momentum = 0.9 # final momentum
self.initial_momentum_epoch = 2 # for how many epochs do we use initial_momentum
self.pretraining_epochs = 4 # total epochs
# finetuning batch size
self.finetune_batch_size = 256 # batch-size for finetuning
# finetuning schedule
self.finetune_momentum = 0.5 # momentum for finetuning
self.lrate = LearningRateExpDecay(start_rate=0.04, # starting learning rate
scale_by = 0.5, # decaying factor in ramping
max_epochs = 1000, # 'dump' epoch limit, never can be reached
min_derror_ramp_start = 0.01, # min validation error difference to trigger ramping
min_derror_stop = 0.01, # min validation error difference to stop finetuning, after ramping
init_error = 100)
#################################################
## PTDNN - Python Toolkit for Deep Neural Network
## Author: Yajie Miao
#################################################
import os
import sys
from utils.learn_rates import LearningRateExpDecay
class BnfExpConfig(object):
def __init__(self):
# working directory; by default, the pfiles should be here
self.wdir = "WORK/" # Note: we'll replace CWD with the current directory
# when we move this to the right place.
self.pretrain_data = self.wdir + 'train.pfile.gz' # pretraining data
self.pretrain_output = self.wdir + "rbm.ptr" # pretraining output
# finetuning data
self.finetune_train_data = self.wdir + 'train.pfile.gz' # finetune training data
self.finetune_valid_data = self.wdir + 'valid.pfile.gz' # finetune validation data
self.finetune_output = self.wdir + "final.nnet.raw" # finetune output
self.nnet_kaldi_fmt = self.wdir + "final.nnet"
# global config for nnet topo
self.n_ins=250 # size of input data
self.n_outs=N_OUTS # number of output targets.. we'll replace this with
# the correct number when we move this to the right place.
self.hidden_layers_sizes=[1024, 1024, 1024, 1024, 42, 1024] # hidden layer sizes
self.bnf_layer_index = 5 # the index of the Bottleneck layer
self.pretrain_layer_num = 4 # number of hidden layers to be pretrained
# global config for data
self.shuffle = True
self.chunk_size = '200m'
# pretraining batch size
self.pretrain_batch_size = 128 # batch-size in pretraining
# pretraining schedule
self.pretrain_gbrbm_lr = 0.005 # learning rate for Gaussian-Bernoulli RBM
self.pretrain_rbm_lr = 0.08 # learning rate for Bernoulli-Bernoulli RBM
self.initial_momentum = 0.5 # initial momentum
self.final_momentum = 0.9 # final momentum
self.initial_momentum_epoch = 5 # for how many epochs do we use initial_momentum
self.pretraining_epochs=10 # total epochs
# finetuning batch size
self.finetune_batch_size = 256 # batch-size for finetuning
# finetuning schedule
self.finetune_momentum = 0.5 # momentum for finetuning
self.lrate = LearningRateExpDecay(start_rate=0.08, # starting learning rate
scale_by = 0.5, # decaying factor in ramping
max_epochs = 1000, # 'dump' epoch limit, never can be reached
min_derror_ramp_start = 0.01, # min validation error difference to trigger ramping
min_derror_stop = 0.01, # min validation error difference to stop finetuning, after ramping
init_error = 100)
# BNF training parameters
bnf_num_hidden_layers=6
bottleneck_dim=42
bnf_hidden_layer_dim=2048
bnf_minibatch_size=512
bnf_init_learning_rate=0.008
bnf_final_learning_rate=0.0008
bnf_max_change=40
bnf_num_jobs=4
bnf_num_threads=1
bnf_mixup=10000
bnf_mpe_learning_rate=0.00009
bnf_mpe_last_layer_factor=0.1
bnf_num_gauss_ubm=550 # use fewer UBM Gaussians than the
# non-bottleneck system (which has 800)
bnf_num_gauss_sgmm=50000 # use fewer SGMM sub-states than the
# non-bottleneck system (which has 80000).
bnf_decode_acwt=0.066666
# DNN hybrid system training parameters
dnn_num_hidden_layers=4
dnn_input_dim=4000
dnn_output_dim=400
dnn_init_learning_rate=0.008
dnn_final_learning_rate=0.0008
dnn_mixup=12000
dnn_mpe_learning_rate=0.00008
dnn_mpe_last_layer_factor=0.1
dnn_mpe_retroactive=true
bnf_every_nth_frame=2 # take every 2nd frame.
babel_type=full
use_pitch=true
lmwt_plp_extra_opts=( --min-lmwt 8 --max-lmwt 12 )
lmwt_bnf_extra_opts=( --min-lmwt 15 --max-lmwt 22 )
lmwt_dnn_extra_opts=( --min-lmwt 10 --max-lmwt 15 )
dnn_beam=16.0
dnn_lat_beam=8.5
icu_opt=(--use-icu true --icu-transform Any-Lower)
if [[ `hostname` == *.tacc.utexas.edu ]] ; then
decode_extra_opts=( --num-threads 4 --parallel-opts "-pe smp 4" )
sgmm_train_extra_opts=( )
sgmm_group_extra_opts=( --num_iters 25 )
sgmm_denlats_extra_opts=( --num-threads 2 )
sgmm_mmi_extra_opts=(--cmd "local/lonestar.py -pe smp 2")
dnn_denlats_extra_opts=( --num-threads 2 )
dnn_cpu_parallel_opts=(--minibatch-size 128 --num-jobs-nnet 8 --num-threads 16 \
--parallel-opts "-pe smp 16" )
dnn_gpu_parallel_opts=(--minibatch-size 512 --num-jobs-nnet 8 --num-threads 1)
dnn_gpu_mpe_parallel_opts=(--num-jobs-nnet 8 --num-threads 1)
dnn_gpu_mpe_parallel_opts=(--num-jobs-nnet 8 --num-threads 1)
dnn_parallel_opts="-l gpu=1"
else
decode_extra_opts=(--num-threads 6 --parallel-opts "-pe smp 6 -l mem_free=4G,ram_free=0.7G")
sgmm_train_extra_opts=( --num-iters 25 )
sgmm_group_extra_opts=(--group 3 --parallel-opts "-pe smp 3 -l mem_free=7G,ram_free=2.75G" --cmd "queue.pl -l arch=*64 -l mem_free=3.0G,ram_free=3.0G")
sgmm_denlats_extra_opts=(--num-threads 4 --parallel-opts "-pe smp 4" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=0.8G")
sgmm_mmi_extra_opts=(--cmd "queue.pl -l arch=*64 -l mem_free=3.2G,ram_free=3.2G")
dnn_denlats_extra_opts=(--num-threads 4 --parallel-opts "-pe smp 4" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=0.8G")
dnn_cpu_parallel_opts=(--minibatch-size 128 --num-jobs-nnet 8 --num-threads 16 \
--parallel-opts "-pe smp 16" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
dnn_gpu_parallel_opts=(--minibatch-size 512 --num-jobs-nnet 8 --num-threads 1 \
--parallel-opts "-l gpu=1" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
dnn_parallel_opts="-l gpu=1"
dnn_gpu_mpe_parallel_opts=(--num-jobs-nnet 8 --num-threads 1 \
--parallel-opts "-l gpu=1" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
fi
icu_transform="Any-Lower"
case_insensitive=true
max_states=150000
wip=0.5
phoneme_mapping=
minimize=true
proxy_phone_beam=-1
proxy_phone_nbest=-1
proxy_beam=5
proxy_nbest=500
extlex_proxy_phone_beam=5
extlex_proxy_phone_nbest=300
extlex_proxy_beam=-1
extlex_proxy_nbest=-1
# BNF training parameters
bnf_num_hidden_layers=5
bottleneck_dim=42
bnf_hidden_layer_dim=1024
bnf_minibatch_size=512
bnf_init_learning_rate=0.008
bnf_final_learning_rate=0.0008
bnf_max_change=40
bnf_num_jobs=4
bnf_num_threads=1
bnf_mixup=5000
bnf_mpe_learning_rate=0.00009
bnf_mpe_last_layer_factor=0.1
bnf_num_gauss_ubm=500 # use fewer UBM Gaussians than the
# non-bottleneck system (which has 750)
bnf_num_gauss_sgmm=10000 # use fewer SGMM sub-states than the
# non-bottleneck system (which has 18000).
bnf_decode_acwt=0.066666
## DNN hybrid system training parameters
dnn_num_hidden_layers=3
dnn_input_dim=2000
dnn_output_dim=200
dnn_init_learning_rate=0.008
dnn_final_learning_rate=0.0008
dnn_mixup=5000
dnn_mpe_learning_rate=0.00009
dnn_mpe_last_layer_factor=0.1
dnn_mpe_retroactive=true
bnf_every_nth_frame=1 # take all frames.
babel_type=limited
use_pitch=true
lmwt_plp_extra_opts=( --min-lmwt 8 --max-lmwt 12 )
lmwt_bnf_extra_opts=( --min-lmwt 15 --max-lmwt 22 )
lmwt_dnn_extra_opts=( --min-lmwt 10 --max-lmwt 15 )
dnn_beam=16.0
dnn_lat_beam=8.5
icu_opt=(--use-icu true --icu-transform Any-Lower)
# Semi-supervised examples options
dnn_update_egs_opts=(--weight-threshold 0.7 --splice-width 4 --samples-per-iter 200000 --num-jobs-nnet 4 --io-opts "-tc 5" )
if [[ `hostname` == *.tacc.utexas.edu ]] ; then
decode_extra_opts=( --num-threads 4 --parallel-opts "-pe smp 4" )
sgmm_train_extra_opts=( --num-iters 25 )
sgmm_group_extra_opts=( )
sgmm_denlats_extra_opts=( --num-threads 1 )
dnn_denlats_extra_opts=( --num-threads 1 )
dnn_cpu_parallel_opts=(--minibatch-size 128 --num-jobs-nnet 8 --num-threads 16 \
--parallel-opts "-pe smp 16" )
dnn_gpu_parallel_opts=(--minibatch-size 512 --num-jobs-nnet 4 --num-threads 1
--parallel-opts "-pe smp 16" )
dnn_gpu_mpe_parallel_opts=(--num-jobs-nnet 4 --num-threads 1)
dnn_update_parallel_opts=( --num-epochs 15 --num-epochs-extra 5 --num-iters-final 20 )
else
decode_extra_opts=(--num-threads 6 --parallel-opts "-pe smp 6 -l mem_free=4G,ram_free=0.7G")
sgmm_train_extra_opts=( --num-iters 25 )
sgmm_group_extra_opts=(--group 3 --parallel-opts "-pe smp 3 -l mem_free=7G,ram_free=2.3G" --cmd "queue.pl -l arch=*64 -l mem_free=2.0G,ram_free=2.0G")
sgmm_denlats_extra_opts=(--num-threads 4 --parallel-opts "-pe smp 4" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=0.8G")
sgmm_mmi_extra_opts=(--cmd "queue.pl -l arch=*64 -l mem_free=1.5G,ram_free=1.5G")
dnn_denlats_extra_opts=(--num-threads 4 --parallel-opts "-pe smp 4" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=0.8G")
dnn_cpu_parallel_opts=(--minibatch-size 128 --num-jobs-nnet 8 --num-threads 16 \
--parallel-opts "-pe smp 16" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
dnn_gpu_parallel_opts=(--minibatch-size 512 --num-jobs-nnet 4 --num-threads 1 \
--parallel-opts "-l gpu=1" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
dnn_parallel_opts="-l gpu=1"
dnn_gpu_mpe_parallel_opts=(--num-jobs-nnet 4 --num-threads 1 \
--parallel-opts "-l gpu=1" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
dnn_update_parallel_opts=( --num-epochs 15 --num-epochs-extra 5 --num-iters-final 20 )
fi
icu_transform="Any-Lower"
case_insensitive=true
max_states=150000
wip=0.5
phoneme_mapping=
minimize=true
proxy_phone_beam=-1
proxy_phone_nbest=-1
proxy_beam=5
proxy_nbest=500
extlex_proxy_phone_beam=5
extlex_proxy_phone_nbest=300
extlex_proxy_beam=-1
extlex_proxy_nbest=-1
## DNN hybrid system training parameters
dnn_num_hidden_layers=3
dnn_input_dim=2000
dnn_output_dim=200
dnn_init_learning_rate=0.008
dnn_final_learning_rate=0.0008
dnn_mixup=5000
num_epochs=15
num_epochs_extra=5
num_iters_final=20
babel_type=limited
# Supervised tuning options
# To update only the last layer using only the supervised data after
# semi-supervised training is done
do_supervised_tuning=true
dnn_update_cpu_parallel_opts=(--minibatch-size 128 --num-jobs-nnet 8 --num-threads 16 \
--parallel-opts "-pe smp 16" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
dnn_update_gpu_parallel_opts=(--minibatch-size 512 --num-jobs-nnet 4 --num-threads 1 \
--parallel-opts "-l gpu=1" --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
# Semi-supervised examples options
egs_gpu_opts=(--splice-width 4 --samples-per-iter 200000 --num-jobs-nnet 4 --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
egs_cpu_opts=(--splice-width 4 --samples-per-iter 200000 --num-jobs-nnet 8 --cmd "queue.pl -l arch=*64 -l mem_free=2G,ram_free=1G")
egs_io_opts="-tc 5"
weight_threshold=0.7
#keyword search default
glmFile=conf/glm
duptime=0.5
case_insensitive=false
use_pitch=true
# Lexicon and Language Model parameters
oovSymbol="<unk>"
lexiconFlags="-oov <unk>"
boost_sil=1.5 # note from Dan: I expect 1.0 might be better (equivalent to not
# having the option)... should test.
cer=0
#Declaring here to make the definition inside the language conf files more
# transparent and nice
declare -A dev10h_more_kwlists
declare -A dev2h_more_kwlists
declare -A eval_more_kwlists
declare -A shadow_more_kwlists
[ -f ./path.sh ] && . ./path.sh; # source the path.