8000 Merge pull request #26 from yajiemiao/master · srvk/eesen@68f2bc2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68f2bc2

Browse files
committed
Merge pull request #26 from yajiemiao/master
incorporate changes made by Guoli Ye to CE utilities
2 parents 95a2c61 + 1e7f9dd commit 68f2bc2

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/net/ce-loss.cc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// Copyright 2011 Brno University of Technology (author: Karel Vesely)
44
// 2015 Yajie Miao
5+
// 2015 Guoli Ye
56

67
// See ../../COPYING for clarification regarding multiple authors
78
//
@@ -75,7 +76,11 @@ void CE::Eval(const CuMatrixBase<BaseFloat> &net_out, const std::vector<int32> &
7576
if (sequences_progress_ > report_step_) {
7677
KALDI_LOG << "After " << sequences_num_ << " sequences (" << frames_/(100.0 * 3600) << "Hr): "
7778
<< "CE-Obj = " << obj_progress_/sequences_progress_
78-
<< " FrameAcc = " << 100.0*(correct_progress_/frames_progress_) << "%";
79+
<< "Frame-level CE-Obj = " << obj_progress_/frames_progress_
80+
<< " FrameAcc = " << 100.0*(double(correct_progress_)/frames_progress_) << "%"
81+
<< " obj_progress_= " << obj_progress_
82+
<< " sequences_progress_= " << sequences_progress_
83+
<< " frames_progress_= " << frames_progress_ ;
7984
// reset
8085
sequences_progress_ = 0;
8186
frames_progress_ = 0;
@@ -148,7 +153,11 @@ void CE::EvalParallel(const CuMatrixBase<BaseFloat> &net_out,
148153
if (sequences_progress_ > report_step_) {
149154
KALDI_LOG << "After " << sequences_num_ << " sequences (" << frames_/(100.0 * 3600) << "Hr): "
150155
<< "CE-Obj = " << obj_progress_/sequences_progress_
151-
<< " FrameAcc = " << 100.0*(correct_progress_/frames_progress_) << "%";
156+
<< "Frame-level CE-Obj = " << obj_progress_/frames_progress_
157+
<< " FrameAcc = " << 100.0*(double(correct_progress_)/frames_progress_) << "%"
158+
<< " obj_progress_= " << obj_progress_
159+
<< " sequences_progress_= " << sequences_progress_
160+
<< " frames_progress_= " << frames_pro C51D gress_ ;
152161
// reset
153162
sequences_progress_ = 0;
154163
frames_progress_ = 0;

src/netbin/train-ce-parallel.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// netbin/train-ce-parallel.cc
22

33
// Copyright 2015 Yajie Miao
4+
// Guoli Ye
45

56
// Licensed under the Apache License, Version 2.0 (the "License");
67
// you may not use this file except in compliance with the License.
@@ -149,6 +150,9 @@ int main(int argc, char *argv[]) {
149150
}
150151
}
151152

153+
// guoye: add here, I think I fix the bugs. Set the original lengths of utterances before padding
154+
net.SetSeqLengths(frame_num_utt);
155+
152156
// Propagation and CTC training
153157
net.Propagate(CuMatrix<BaseFloat>(feat_mat_host), &net_out);
154158
ce.EvalParallel(net_out, target_host, &obj_diff, frame_mask_host, cur_sequence_num);

0 commit comments

Comments
 (0)
0