orbit.utils.EpochHelper

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

View source

epoch_begin()

Returns whether a new epoch should begin.

epoch_end

View source

epoch_end()

Returns whether the current epoch should end.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.

Last updated 2025年04月18日 UTC.