Skip to content

Commit

Permalink
Small fix to fgmm/fgmm-global-acc-stats-post.cc for DNN-SID system
Browse files Browse the repository at this point in the history
  • Loading branch information
david-ryan-snyder committed Aug 18, 2015
1 parent a8056d5 commit f096aaa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/fgmmbin/fgmm-global-acc-stats-post.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ int main(int argc, char *argv[]) {
std::string key = feature_reader.Key();
const Matrix<BaseFloat> &mat = feature_reader.Value();
int32 file_frames = mat.NumRows();

if (!post_reader.HasKey(key)) {
KALDI_WARN << "No posteriors available for utterance "
<< key;
num_err++;
continue;
}

Posterior post = post_reader.Value(key);
// Initialize the FGMM accs before processing the first utt.
if (num_done == 0) {
fgmm_accs.Resize(num_components, mat.NumCols(),
Expand All @@ -104,7 +111,6 @@ int main(int argc, char *argv[]) {
}
}

Posterior post = post_reader.Value(key);
if (post.size() != static_cast<size_t>(file_frames)) {
KALDI_WARN << "posterior information for utterance " << key
<< " has wrong size " << post.size() << " vs. "
Expand Down

0 comments on commit f096aaa

Please sign in to comment.