Fixes to SGMM training scripts.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@13 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
This commit is contained in:
Dan Povey 2011-05-15 18:26:18 +00:00
Родитель 8661ed1ea6
Коммит e7ee0537bb
2 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -87,6 +87,13 @@ fi
convert-ali $srcmodel $dir/0.mdl $dir/tree ark:$dir/0.ali \ convert-ali $srcmodel $dir/0.mdl $dir/tree ark:$dir/0.ali \
ark:$dir/cur.ali 2>$dir/convert.log ark:$dir/cur.ali 2>$dir/convert.log
rm $dir/0.ali
# Make training graphs
echo "Compiling training graphs"
compile-train-graphs $dir/tree $dir/1.mdl data/L.fst ark:data/train.tra \
"ark:|gzip -c >$dir/graphs.fsts.gz" 2>$dir/compile_graphs.log || exit 1
iter=0 iter=0
while [ $iter -lt $numiters ]; do while [ $iter -lt $numiters ]; do
echo "Pass $iter ... " echo "Pass $iter ... "
@ -94,7 +101,7 @@ while [ $iter -lt $numiters ]; do
echo "Aligning data" echo "Aligning data"
echo "Aligning data" echo "Aligning data"
sgmm-align-compiled $spkvecs_opt $scale_opts "$gselect_opt" --beam=8 \ sgmm-align-compiled $spkvecs_opt $scale_opts "$gselect_opt" --beam=8 \
--retry-beam=40 $dir/$iter.mdl "$srcgraphs" "$feats" \ --retry-beam=40 $dir/$iter.mdl "ark:gunzip -c $dir/graphs.fsts.gz|" "$feats" \
ark:$dir/cur.ali 2> $dir/align.$iter.log || exit 1; ark:$dir/cur.ali 2> $dir/align.$iter.log || exit 1;
fi fi
if [ $iter -gt 0 ]; then if [ $iter -gt 0 ]; then

Просмотреть файл

@ -98,13 +98,21 @@ fi
convert-ali $srcmodel $dir/0.mdl $dir/tree ark:$dir/0.ali \ convert-ali $srcmodel $dir/0.mdl $dir/tree ark:$dir/0.ali \
ark:$dir/cur.ali 2>$dir/convert.log ark:$dir/cur.ali 2>$dir/convert.log
rm $dir/0.ali
# Make training graphs
echo "Compiling training graphs"
compile-train-graphs $dir/tree $dir/1.mdl data/L.fst ark:data/train.tra \
"ark:|gzip -c >$dir/graphs.fsts.gz" 2>$dir/compile_graphs.log || exit 1
iter=0 iter=0
while [ $iter -lt $numiters ]; do while [ $iter -lt $numiters ]; do
echo "Pass $iter ... " echo "Pass $iter ... "
if echo $realign_iters | grep -w $iter >/dev/null; then if echo $realign_iters | grep -w $iter >/dev/null; then
echo "Aligning data" echo "Aligning data"
sgmm-align-compiled $spkvecs_opt $utt2spk_opt $scale_opts "$gselect_opt" \ sgmm-align-compiled $spkvecs_opt $utt2spk_opt $scale_opts "$gselect_opt" \
--beam=8 --retry-beam=40 $dir/$iter.mdl "$srcgraphs" "$feats" \ --retry-beam=40 $dir/$iter.mdl "ark:gunzip -c $dir/graphs.fsts.gz|" "$feats" \
ark:$dir/cur.ali 2> $dir/align.$iter.log || exit 1; ark:$dir/cur.ali 2> $dir/align.$iter.log || exit 1;
fi fi
if echo $spkvec_iters | grep -w $iter >/dev/null; then if echo $spkvec_iters | grep -w $iter >/dev/null; then