A simple class to hold the three notions of time during training: the current epoch, the current time index within the current epoch, and the absolute time index.
More...
#include <training-time.H>
A simple class to hold the three notions of time during training: the current epoch, the current time index within the current epoch, and the absolute time index.
Definition at line 56 of file training-time.H.
Constructs a new time instance, ready for its indices to be incremented.
Definition at line 59 of file training-time.H.
reranker::Time::Time |
( |
int |
epoch, |
|
|
int |
index, |
|
|
int |
absolute_index |
|
) |
| |
|
inline |
Constructs a new time instance with the specified time indices.
- Parameters
-
epoch | the current epoch |
index | the current time index within the current epoch |
absolute_index | the absolute time index |
Definition at line 66 of file training-time.H.
int reranker::Time::absolute_index |
( |
| ) |
const |
|
inline |
Returns the total number of training examples seen in all epochs.
Definition at line 79 of file training-time.H.
double reranker::Time::absolute_seconds |
( |
| ) |
const |
|
inline |
int reranker::Time::epoch |
( |
| ) |
const |
|
inline |
Returns the index of the current epoch.
Definition at line 74 of file training-time.H.
int reranker::Time::index |
( |
| ) |
const |
|
inline |
Returns the index of the current training example within the current epoch.
Definition at line 77 of file training-time.H.
void reranker::Time::NewEpoch |
( |
| ) |
|
|
inline |
double reranker::Time::seconds_since_last_epoch |
( |
| ) |
const |
|
inline |
void reranker::Time::Tick |
( |
| ) |
|
|
inline |
Increments both the time index for the current epoch and the absolute time index.
Definition at line 104 of file training-time.H.
string reranker::Time::to_string |
( |
| ) |
const |
|
inline |
ostream& operator<< |
( |
ostream & |
os, |
|
|
const Time & |
time |
|
) |
| |
|
friend |
The documentation for this class was generated from the following file: