Commit 6038f27e authored by Tom Hennigan's avatar Tom Hennigan Committed by TensorFlower Gardener
Browse files

Automatically enter the strategy scope when reading or assigning variables.

>>> s = tf.distribute.MirroredStrategy(..)
>>> with s.scope():
...   model = Model()
...   target = Model()

>>> for a, b in zip(model.variables, target.variables):
...   b.assign(a)

PiperOrigin-RevId: 238302012
parent bf5bf8cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment