Commit 3f89fab7 authored by Karel Vesely's avatar Karel Vesely
Browse files

trunk,nnet: updating the training scripts,



git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4570 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 24209853
......@@ -44,6 +44,7 @@ feadir=$5
sdata=$srcdata/split$nj;
splice_opts=`cat $gmmdir/splice_opts 2>/dev/null` # frame-splicing options.
cmvn_opts=`cat $gmmdir/cmvn_opts 2>/dev/null`
delta_opts=`cat $gmmdir/delta_opts 2>/dev/null`
mkdir -p $data $logdir $feadir
[[ -d $sdata && $srcdata/feats.scp -ot $sdata ]] || split_data.sh $srcdata $nj || exit 1;
......@@ -61,6 +62,7 @@ fi
# Figure-out the feature-type,
feat_type=delta # Default
[ ! -f $gmmdir/final.mat -a ! -z "$transform_dir" ] && feat_type=delta_fmllr
[ -f $gmmdir/final.mat ] && feat_type=lda
[ -f $gmmdir/final.mat -a ! -z "$transform_dir" ] && feat_type=lda_fmllr
[ ! -z "$raw_transform_dir" ] && feat_type=raw_fmllr
......@@ -69,7 +71,8 @@ echo "$0: feature type is $feat_type";
# Hand-code the feature pipeline,
case $feat_type in
delta) feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
delta) feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas $delta_opts ark:- ark:- |";;
delta_fmllr) feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas $delta_opts ark:- ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk \"ark:cat $transform_dir/trans.* |\" ark:- ark:- |";;
lda) feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $gmmdir/final.mat ark:- ark:- |";;
lda_fmllr) feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $gmmdir/final.mat ark:- ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk \"ark:cat $transform_dir/trans.* |\" ark:- ark:- |";;
raw_fmllr) feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$raw_transform_dir/raw_trans.JOB ark:- ark:- |";;
......
......@@ -214,7 +214,6 @@ for depth in $(seq 1 $nn_depth); do
if [ "$depth" == "1" ]; then
# This is usually Gaussian-Bernoulli RBM (not if CNN layers are part of input transform)
# initialize
[ ! -z $cnn ] && vis_type=bern || vis_type=gauss
echo "Initializing '$RBM.init'"
echo "<NnetProto>
<Rbm> <InputDim> $num_fea <OutputDim> $num_hid <VisibleType> $input_vis_type <HiddenType> bern <ParamStddev> $param_stddev_first
......
......@@ -204,6 +204,8 @@ else
fi
# optionally add deltas
delta_order_file=$(dirname $feature_transform)/delta_order
[ -e $delta_order_file ] && delta_order=$(cat $delta_order_file)
if [ "$delta_order" != "" ]; then
feats_tr="$feats_tr add-deltas --delta-order=$delta_order ark:- ark:- |"
feats_cv="$feats_cv add-deltas --delta-order=$delta_order ark:- ark:- |"
......
......@@ -19,8 +19,8 @@ lmwt=1.0
learn_rate=0.00001
halving_factor=1.0 #ie. disable halving
do_smbr=true
use_silphones=false # exclude silphones from approximate accuracy computation
unkphonelist= # exclude unkphones from approximate accuracy computation (overrides use_silphones)
exclude_silphones=false # exclude silphones from approximate accuracy computation
unkphonelist= # exclude unkphones from approximate accuracy computation (overrides exclude_silphones)
verbose=1
seed=777 # seed value used for training data shuffling
......@@ -87,7 +87,7 @@ model=$dir/final.mdl
#enable/disable silphones from MPE training
mpe_silphones_arg= #empty
$use_silphones && mpe_silphones_arg="--silence-phones=$silphonelist" # all silphones
$exclude_silphones && mpe_silphones_arg="--silence-phones=$silphonelist" # all silphones
[ ! -z $unkphonelist ] && mpe_silphones_arg="--silence-phones=$unkphonelist" # unk only
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment