Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion egs/wsj/s5/steps/libs/nnet3/train/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ def get_multitask_egs_opts(egs_dir, egs_prefix="",
'--output=ark:foo/egs/output.3.ark --weight=ark:foo/egs/weights.3.ark'
i.e. egs_prefix is "" for train and
"valid_diagnostic." for validation.

Caution: archive_index is usually an integer, but may be a string ("JOB")
in some cases.
"""
multitask_egs_opts = ""
egs_suffix = ".{0}".format(archive_index) if archive_index > -1 else ""
egs_suffix = ".{0}".format(archive_index) if archive_index != -1 else ""

if use_multitask_egs:
output_file_name = ("{egs_dir}/{egs_prefix}output{egs_suffix}.ark"
Expand Down
2 changes: 1 addition & 1 deletion src/rnnlm/rnnlm-example-utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static void ProcessRnnlmOutputNoSampling(
row_sums.ApplyLog();
BaseFloat ans = -VecVec(row_sums, minibatch.output_weights);
*objf_den_exact = ans;
if (fabs(ans) > 100) {
if (fabs(ans) > 1.0 * nnet_output.NumRows()) {
KALDI_WARN << "Big den objf " << ans;
}
}
Expand Down