Commit 415dd2d4 authored by Dan Povey's avatar Dan Povey
Browse files

Committing MMI training scripts.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/sandbox/discrim@477 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent cd5af17c
...@@ -46,8 +46,6 @@ srcdir=$3 ...@@ -46,8 +46,6 @@ srcdir=$3
dir=$4 dir=$4
model=$srcdir/final.mdl
mkdir -p $dir mkdir -p $dir
cp $srcdir/{tree,final.mdl,final.occs} $dir || exit 1; # Create copy of the tree and model and occs... cp $srcdir/{tree,final.mdl,final.occs} $dir || exit 1; # Create copy of the tree and model and occs...
......
...@@ -86,7 +86,7 @@ cat $dir/train.tra | awk '{for(n=2;n<=NF;n++){ printf("%s ", $n); } printf("\n") ...@@ -86,7 +86,7 @@ cat $dir/train.tra | awk '{for(n=2;n<=NF;n++){ printf("%s ", $n); } printf("\n")
# it gets L_disambig.fst and G.fst (among other things) from $dir/lang, and # it gets L_disambig.fst and G.fst (among other things) from $dir/lang, and
# final.mdl from $alidir; the output HCLG.fst goes in $dir/graph. # final.mdl from $alidir; the output HCLG.fst goes in $dir/graph.
scripts/mkgraph.sh $dir/lang $alidir $dir/graph || exit 1; scripts/mkgraph.sh $dir/lang $alidir $dir/dgraph || exit 1;
echo "Making denominator lattices" echo "Making denominator lattices"
...@@ -95,7 +95,7 @@ rm $dir/.error 2>/dev/null ...@@ -95,7 +95,7 @@ rm $dir/.error 2>/dev/null
for n in 0 1 2 3; do for n in 0 1 2 3; do
gmm-latgen-simple --beam=$beam --lattice-beam=$latticebeam --acoustic-scale=$acwt \ gmm-latgen-simple --beam=$beam --lattice-beam=$latticebeam --acoustic-scale=$acwt \
--word-symbol-table=$lang/words.txt \ --word-symbol-table=$lang/words.txt \
$alidir/final.mdl $dir/graph/HCLG.fst "${featspart[$n]}" "ark:|gzip -c >$dir/lat$n.gz" \ $alidir/final.mdl $dir/dgraph/HCLG.fst "${featspart[$n]}" "ark:|gzip -c >$dir/lat$n.gz" \
2>$dir/decode_den.$n.log || touch $dir/.error & 2>$dir/decode_den.$n.log || touch $dir/.error &
done done
wait wait
...@@ -138,7 +138,7 @@ while [ $x -lt $num_iters ]; do ...@@ -138,7 +138,7 @@ while [ $x -lt $num_iters ]; do
impr=`grep Overall $dir/update.$x.log | awk '{print $10;}'` impr=`grep Overall $dir/update.$x.log | awk '{print $10;}'`
impr=`perl -e "print ($impr * $acwt);"` # auxf impr normalized by multiplying by impr=`perl -e "print ($impr * $acwt);"` # auxf impr normalized by multiplying by
# kappa, so it's comparable to an objective-function change. # kappa, so it's comparable to an objective-function change.
echo On iter $x, objf was $diff, auxf improvement was $impr echo On iter $x, objf was $diff, auxf improvement was $impr | tee $dir/objf.$x.log
x=$[$x+1] x=$[$x+1]
done done
......
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