tfr.keras.strategy_utils.strategy_scope
Gets the strategy.scope() for training with strategy.
tfr.keras.strategy_utils.strategy_scope(
strategy: Optional[tf.distribute.Strategy]
) -> Any
Example usage:
with strategy_scope(strategy):
model = ...
Args |
strategy
|
Distributed training strategy is used.
|
Returns |
ContextManager for the distributed training strategy.
|
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.
[null,null,["Last updated 2023-08-18 UTC."],[],[]]