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 (involving
train_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. If
True , this optimization creates two tf.function s 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 2024-07-19 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-07-19 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-19 UTC."],[],[]]