Skip to content
Snippets Groups Projects
Commit 69e915a0 authored by Dan Povey's avatar Dan Povey
Browse files

Fixes toSGMM training script. Cosmetic change to queue.pl, run.pl

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@909 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent dd957295
No related branches found
No related tags found
No related merge requests found
......@@ -122,17 +122,17 @@ steps/train_mmi.sh data/train data/lang exp/tri3b_ali exp/tri3b_denlats exp/tri3
steps/decode_fmllr.sh --nj 20 --cmd "$decode_cmd" --alignment-model exp/tri3b/final.alimdl \
--adapt-model exp/tri3b/final.mdl exp/tri3b/graph data/test exp/tri3b_mmi/decode || exit 1;
# of LDA+MLLT+SAT features.
steps/train_ubm.sh 400 data/train data/lang exp/tri3b_ali exp/ubm4a || exit 1;
steps/train_sgmm.sh 2500 7500 data/train data/lang exp/tri3b_ali exp/ubm4a/final.ubm exp/sgmm4a || exit 1;
# TEMP... not finished past here.
# Things below here are commands from the old run.sh,
# and I have to change them for the current run.sh.
exit 0;
# of LDA+MLLT+SAT features.
steps/train_ubm.sh 400 data/train data/lang exp/tri3b_ali exp/ubm4a || exit 1;
steps/train_sgmm.sh data/train data/lang exp/tri2b_ali exp/ubm3d/final.ubm exp/sgmm3d || exit 1;
scripts/mkgraph.sh data/lang_test exp/sgmm3d exp/sgmm3d/graph || exit 1;
local/decode.sh steps/decode_sgmm_lda_etc.sh exp/sgmm3d/decode || exit 1;
......
......@@ -266,7 +266,7 @@ steps/decode_si.sh --nj 8 --cmd "$decode_cmd" \
#fi #TEMP
# From 2b system, train 3b which is LDA + MLLT + SAT.
steps/train_sat.sh --cmd "$train_cmd" \
steps/train_sat.sh --cmd "$train_cmd" \
2500 15000 data/train_si84 data/lang exp/tri2b_ali_si84 exp/tri3b || exit 1;
utils/mkgraph.sh data/lang_test_tgpr exp/tri3b exp/tri3b/graph_tgpr || exit 1;
steps/decode_fmllr.sh --nj 10 --cmd "$decode_cmd" \
......
......@@ -65,7 +65,7 @@ oov=`cat $lang/oov.int`
silphonelist=`cat $lang/phones/silence.csl`
numsubstates=$num_leaves # Initial #-substates.
incsubstates=$[($totsubstates-$numsubstates)/$max_iter_inc] # per-iter increment for #substates
feat_dim=`gmm-info $alidir/final.model | awk '/feature dimension/{print $NF}'` || exit 1;
feat_dim=`gmm-info $alidir/final.mdl 2>/dev/null | awk '/feature dimension/{print $NF}'` || exit 1;
[ $feat_dim -eq $feat_dim ] || exit 1; # make sure it's numeric.
[ -z $phn_dim ] && phn_dim=$[$feat_dim+1]
[ -z $spk_dim ] && spk_dim=$feat_dim
......@@ -116,7 +116,7 @@ if [ $stage -le -5 ]; then
echo "$0: Building the tree"
$cmd $dir/log/build_tree.log \
build-tree --verbose=1 --max-leaves=$numleaves \
build-tree --verbose=1 --max-leaves=$num_leaves \
$dir/treeacc $lang/phones/roots.int \
$dir/questions.qst $lang/topo $dir/tree || exit 1;
fi
......@@ -165,7 +165,7 @@ while [ $x -lt $num_iters ]; do
fi
if [ $spk_dim -gt 0 ] && echo $spkvec_iters | grep -w $x >/dev/null; then
if [ $stage -le $x ]; then
$cmd $dir/log/spkvecs.$x.JOB.log \
$cmd JOB=1:$nj $dir/log/spkvecs.$x.JOB.log \
ali-to-post "ark:gunzip -c $dir/ali.JOB.gz|" ark:- \| \
weight-silence-post 0.01 $silphonelist $dir/$x.mdl ark:- ark:- \| \
sgmm-est-spkvecs --rand-prune=$rand_prune --spk2utt=ark:$sdata/JOB/spk2utt \
......@@ -186,7 +186,7 @@ while [ $x -lt $num_iters ]; do
fi
if [ $stage -le $x ]; then
$cmd $dir/log/acc.$x.JOB.log \
$cmd JOB=1:$nj $dir/log/acc.$x.JOB.log \
sgmm-acc-stats $spkvecs_opt --utt2spk=ark:$sdata/JOB/utt2spk \
--update-flags=$flags "$gselect_opt" --rand-prune=$rand_prune \
$dir/$x.mdl "$feats" "ark,s,cs:gunzip -c $dir/ali.JOB.gz | ali-to-post ark:- ark:-|" \
......@@ -212,8 +212,7 @@ while [ $x -lt $num_iters ]; do
sgmm-est --update-flags=$flags --split-substates=$numsubstates $increase_dim_opts \
--write-occs=$dir/$[$x+1].occs $dir/$x.mdl "sgmm-sum-accs - $dir/$x.*.acc|" \
$dir/$[$x+1].mdl || exit 1;
rm $dir/$x.mdl $dir/$x.*.acc $dir/$x.occs
rm $dir/$x.mdl $dir/$x.*.acc $dir/$x.occs 2>/dev/null
fi
if [ $x -lt $max_iter_inc ]; then
......@@ -242,7 +241,7 @@ if [ $spk_dim -gt 0 ]; then
flags=vMwcS
fi
if [ $stage -le $x ]; then
$cmd $dir/log/acc_ali.$x.JOB.log \
$cmd JOB=1:$nj $dir/log/acc_ali.$x.JOB.log \
ali-to-post "ark:gunzip -c $dir/ali.JOB.gz|" ark:- \| \
sgmm-post-to-gpost $spkvecs_opt "$gselect_opt" \
--utt2spk=ark:$sdata/JOB/utt2spk $dir/$x.mdl "$feats" ark,s,cs:- ark:- \| \
......
......@@ -244,7 +244,7 @@ else { # we failed.
if (defined $jobname) { $logfile =~ s/\$SGE_TASK_ID/$jobstart/g; }
print STDERR "queue.pl: job writing to $logfile failed with status $status\n";
if ($logfile =~ m/JOB/) {
print STDERR "queue.pl: probably you forgot to put JOB=1:\$nj in your script.";
print STDERR "queue.pl: probably you forgot to put JOB=1:\$nj in your script.\n";
}
} else {
if (defined $jobname) { $logfile =~ s/\$SGE_TASK_ID/*/g; }
......
......@@ -109,7 +109,7 @@ if ($ret != 0) {
if ($njobs == 1) {
print STDERR "run.pl: job writing to $logfile failed\n";
if ($logfile =~ m/JOB/) {
print STDERR "queue.pl: probably you forgot to put JOB=1:\$nj in your script.";
print STDERR "queue.pl: probably you forgot to put JOB=1:\$nj in your script.\n";
}
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment