View source on GitHub |
A helper class handle bookkeeping of epochs in custom training loops.
orbit.utils.EpochHelper(
epoch_steps: int, global_step: tf.Variable
)
Args | |
---|---|
epoch_steps
|
An integer indicating how many steps are in an epoch. |
global_step
|
A tf.Variable providing the current global step.
|
Attributes | |
---|---|
batch_index
|
Index of the next batch within the current epoch. |
current_epoch
|
Methods
epoch_begin
epoch_begin()
Returns whether a new epoch should begin.
epoch_end
epoch_end()
Returns whether the current epoch should end.