Module: tfr.keras.strategy_utils
Stay organized with collections
Save and categorize content based on your preferences.
tf.distribute strategy utils for Ranking pipeline in tfr.keras.
In TF2, the distributed training can be easily handled with Strategy offered in
tf.distribute. Depending on device and MapReduce technique, there are four
strategies are currently supported. They are:
MirroredStrategy: synchronous strategy on a single CPU/GPU worker.
MultiWorkerMirroredStrategy: synchronous strategy on multiple CPU/GPU workers.
TPUStrategy: distributed strategy working on TPU.
ParameterServerStrategy: asynchronous distributed strategy on CPU/GPU workers.
Note: ParameterServerStrategy is not fully compatible with model.fit
in
current version of tensorflow, thus not supported.
Please check https://www.tensorflow.org/guide/distributed_training for more
information.
Classes
class NullContextManager
: A null context manager for local training.
Functions
get_output_filepath(...)
: Gets filepaths for different workers to resolve conflict of MWMS.
get_strategy(...)
: Creates and initializes the requested tf.distribute strategy.
strategy_scope(...)
: Gets the strategy.scope() for training with strategy.
Other Members
MIRRORED_STRATEGY
'MirroredStrategy'
MWMS_STRATEGY
'MultiWorkerMirroredStrategy'
PS_STRATEGY
'ParameterServerStrategy'
TPU_STRATEGY
'TPUStrategy'
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.
Last updated 2023-08-18 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 2023-08-18 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 2023-08-18 UTC."],[],[]]