You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the strategy object to open a scope, and within this scope, create all the Keras
objects you need that contain variables. Typically, that means creating & compiling the
model inside the distribution scope. In some cases, the first call to fit() may also
create variables, so it's a good idea to put your fit() call in the scope as well.
Similarly the code sample on that page has fit within the strategy scope.
Use the strategy object to open a scope, and within this scope, create all the Keras objects you need that contain variables. Typically, that means creating & compiling the model inside the distribution scope.
Similarly the code sample on that page has fit outside the strategy scope.
Standalone code to reproduce the issue or tutorial link
Documentation issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Issue Type
Documentation Bug
Source
source
Keras Version
current master branch
Custom Code
No
OS Platform and Distribution
No response
Python version
No response
GPU model and memory
No response
Current Behavior?
Documentation discrepancy.
https://github.com/keras-team/keras-io/blob/9c3b9b7b1f0ffc20f13833b067925d757b961a42/guides/distributed_training_with_tensorflow.py#L82C1-L86C1
Similarly the code sample on that page has
fit
within the strategy scope.https://www.tensorflow.org/guide/keras/distributed_training
Similarly the code sample on that page has
fit
outside the strategy scope.Standalone code to reproduce the issue or tutorial link
Relevant log output
No response
The text was updated successfully, but these errors were encountered: