Skip to content

Commit

Permalink
Report the correct epoch time in seconds. (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoq authored Feb 12, 2022
1 parent f75b532 commit f077ea5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* Update Catch2 to 2.13.8
([#336](https://github.com/mlpack/ensmallen/pull/336)).

* Fix epoch timing output
([#337](https://github.com/mlpack/ensmallen/pull/337)).

### ensmallen 2.18.1: "Fairmount Bagel"
###### 2021-11-19
* Accelerate SGD test time
Expand Down
8 changes: 4 additions & 4 deletions include/ensmallen_bits/callbacks/progress_bar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ class ProgressBar
output << ".";
}
}

const size_t stepTime = epochTimer.toc() / (double) epochSize * 1000;
output << "] " << progress << "% - " << (size_t) epochTimer.toc() % 60
<< "s " << stepTime << "ms/step " << "- loss: " << objective << "\n";
const double epochTimerElapsed = epochTimer.toc();
const size_t stepTime = epochTimerElapsed / (double) epochSize * 1000;
output << "] " << progress << "% - " << epochTimerElapsed
<< "s/epoch; " << stepTime << "ms/step; loss: " << objective << "\n";
output.flush();
}

Expand Down

0 comments on commit f077ea5

Please sign in to comment.