orbit.StandardTrainerOptions | TensorFlow v2.16.1 (original) (raw)
orbit.StandardTrainerOptions
Stay organized with collections Save and categorize content based on your preferences.
Advanced options for orbit.StandardTrainer.
orbit.StandardTrainerOptions(
use_tf_function: bool = True,
use_tf_while_loop: bool = True,
use_tpu_summary_optimization: bool = False
)
Attributes | |
---|---|
use_tf_function | A boolean indicating whether to apply tf.function to the training loop. This will only affect the body of the loop (involvingtrain_step); train_loop_begin and train_loop_end will always be run in eager mode. |
use_tf_while_loop | A boolean indicating whether to run the training loop using a tf.while_loop. If True, use_tf_function must also be True. |
use_tpu_summary_optimization | A boolean indicating whether to enable a performance optimization for summaries in TPUs. Writing summaries conditionally with outside compilation on TPUs can be extremely slow. IfTrue, this optimization creates two tf.functions with two XLA programs (one with summary calls, and one without). The program with summaries runs only for one step when summaries should be recorded. |
Methods
__eq__
__eq__(
other
)
Class Variables | |
---|---|
use_tf_function | True |
use_tf_while_loop | True |
use_tpu_summary_optimization | False |
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.