Commit fd8509cd authored by Dan Povey's avatar Dan Povey
Browse files

trunk: various minor cosmetic fixes.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4224 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent f87d2486
......@@ -12,7 +12,6 @@
# Begin configuration section.
stage=-5
fmllr_update_type=full
cmd=run.pl
scale_opts="--transition-scale=1.0 --acoustic-scale=0.1 --self-loop-scale=0.1"
beam=10
......@@ -197,9 +196,9 @@ while [ $x -lt $num_iters ]; do
if echo $fmllr_iters | grep -w $x >/dev/null; then
if [ $stage -le $x ]; then
echo Estimating fMLLR transforms
# We estimate a transform that's additional to the previous transform;
# we'll compose them.
# Note: it's not really necessary to re-estimate the basis each time
# but this is the way the script does it right now.
echo Estimating basis and fMLLR transforms
$cmd JOB=1:$nj $dir/log/fmllr_est.$x.JOB.log \
ali-to-post "ark:gunzip -c $dir/ali.JOB.gz|" ark:- \| \
weight-silence-post $silence_weight $silphonelist $dir/$x.mdl ark:- ark:- \| \
......@@ -209,7 +208,7 @@ while [ $x -lt $num_iters ]; do
# Compute the basis matrices.
$cmd $dir/log/basis_training.log \
gmm-basis-fmllr-training $dir/$x.mdl $dir/fmllr.basis $dir/basis.acc.* || exit 1;
gmm-basis-fmllr-training $dir/$x.mdl $dir/fmllr.basis $dir/basis.acc.* || exit 1;
$cmd JOB=1:$nj $dir/log/fmllr_app.$x.JOB.log \
ali-to-post "ark:gunzip -c $dir/ali.JOB.gz|" ark:- \| \
......
......@@ -46,6 +46,14 @@ done
! cat $data/utt2spk | awk '{if (NF != 2) exit(1); }' && \
echo "$0: $data/utt2spk has wrong format." && exit;
ns=$(wc -l < $data/spk2utt)
if [ "$ns" == 1 ]; then
echo "$0: WARNING: you have only one speaker. This probably a bad idea."
echo " Search for the word 'bold' in http://kaldi.sourceforge.net/data_prep.html"
echo " for more information."
fi
tmpdir=$(mktemp -d kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT HUP INT PIPE TERM
......
......@@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {
"indices. Also supports pruning the posteriors if they are below\n"
"a stated threshold, (and renormalizing the rest to sum to one)\n"
"See also: gmm-gselect, fgmm-gselect, gmm-global-get-post,\n"
" fgmm-global-gselect-to-post\n"
" gmm-global-gselect-to-post\n"
"\n"
"Usage: fgmm-global-gselect-to-post [options] <model-in> <feature-rspecifier> "
"<gselect-rspecifier> <post-wspecifier>\n"
......
......@@ -469,12 +469,12 @@ int32 LinearCgd(const LinearCgdOptions &opts,
residual_factor = opts.recompute_residual_factor *
opts.recompute_residual_factor;
// Note: although from a mathematical point of view the method should
// converge after M iterations, in practice it does not always converge
// to good precision after that many iterations so we let the maximum
// be 1.5 * M instead.
// Note: although from a mathematical point of view the method should converge
// after M iterations, in practice (due to roundoff) it does not always
// converge to good precision after that many iterations so we let the maximum
// be 1.5 * M + 5 instead.
int32 k = 0;
for (; k < M + M / 2 && k != opts.max_iters; k++) {
for (; k < M + M / 2 + 5 && k != opts.max_iters; k++) {
// Note: we'll break from this loop if we converge sooner due to
// max_error.
Ap.AddSpVec(1.0, A, p, 0.0); // Ap = A p
......
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