Skip to content
Snippets Groups Projects
Commit 19241015 authored by Karel Vesely's avatar Karel Vesely
Browse files

trunk: cosmetic changes


git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@3414 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent a796a527
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,10 @@ $outdir = "";
if (@ARGV == 2) {
$outdir = pop @ARGV;
unless (-d $outdir) {
print STDERR "Could not find directory $outdir\n";
system("mkdir -p $outdir");
}
unless (-d $outdir) {
print STDERR "Could not create directory $outdir\n";
exit 1;
}
}
......
......@@ -202,7 +202,7 @@ if ($utt2spk_file ne "") { # We have the --utt2spk option...
}
$numlines = @F;
if($numlines == 0) {
print STDERR "split_scp.pl: error: empty input scp file $inscp";
print STDERR "split_scp.pl: error: empty input scp file $inscp , ";
$error = 1;
}
$linesperscp = int( $numlines / $numscps); # the "whole part"..
......
......@@ -51,6 +51,9 @@ int main(int argc, char *argv[]) {
bool binary = false;
po.Register("binary", &binary, "Write output in binary mode");
bool with_bug = true;
po.Register("with-bug", &with_bug, "Apply bug which led to better results (set-initial-momentum-to-max)");
int32 num_iters = 1;
po.Register("num-iters", &num_iters,
"Number of iterations (smaller datasets should have more iterations, "
......@@ -240,12 +243,12 @@ int main(int argc, char *argv[]) {
if(n - n_prev > 0) {
n_prev = n;
BaseFloat learning_rate_actual = learn_rate*(1-momentum_actual);
KALDI_VLOG(1) << "Setting momentum " << momentum_actual
KALDI_VLOG(1) << "Setting momentum " << (with_bug ? momentum_max : momentum_actual)
<< " and learning rate " << learning_rate_actual
<< " after processing "
<< static_cast<double>(total_frames)/360000 << "h";
// pass values to rbm
trn_opts_rbm.momentum = momentum_actual;
trn_opts_rbm.momentum = (with_bug ? momentum_max : momentum_actual);
trn_opts_rbm.learn_rate = learning_rate_actual;
rbm.SetRbmTrainOptions(trn_opts_rbm);
}
......
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