Skip to content

Commit

Permalink
add page in timer for htkmlreader
Browse files Browse the repository at this point in the history
  • Loading branch information
chivee committed Apr 19, 2016
1 parent 2a87abf commit 82f290f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Readers/HTKMLFReader/utterancesourcemulti.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class minibatchutterancesourcemulti : public minibatchsource
try // this function supports retrying since we read from the unrealible network, i.e. do not return in a broken state
{
msra::asr::htkfeatreader reader; // feature reader (we reinstantiate it for each block, i.e. we reopen the file actually)
auto_timer pageintimer;
// if this is the first feature read ever, we explicitly open the first file to get the information such as feature dimension
if (featdim == 0)
{
Expand All @@ -174,8 +175,11 @@ class minibatchutterancesourcemulti : public minibatchsource
latticesource.getlattices(utteranceset[i].key(), lattices[i], uttframes.cols());
}
// fprintf (stderr, "\n");
if (verbosity)
fprintf(stderr, "requiredata: %d utterances read\n", (int) utteranceset.size());
if (verbosity)
{
double pageintime = (double)pageintimer;
fprintf(stderr, "requiredata: %d utterances read, time usage = %.8g, total frames = %d, avg speed = %.8g(frames/sec). \n", (int)utteranceset.size(), pageintime ,totalframes, (double)totalframes /pageintime);
}
}
catch (...)
{
Expand Down

0 comments on commit 82f290f

Please sign in to comment.