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
Loading
Please sign in to comment