mighty.monitor.batch_timer.BatchTimer¶
- class mighty.monitor.batch_timer.BatchTimer[source]¶
A global batch timer.
Methods
__init__
()- Returns:
init
(batches_in_epoch)Initialize the timer by providing the epoch length.
- Returns:
set_epoch
(epoch)Manually set the epoch.
tick
()Increments the number of elapsed batches by 1.
Attributes
- Returns:
- property epoch¶
- Returns:
- int
Epoch id.
- init(batches_in_epoch)[source]¶
Initialize the timer by providing the epoch length.
- Parameters:
- batches_in_epochint
The number of batches in an epoch.