Move variable ownership test into extended.variable_created_in_scope.
We want to invert the relationship here, instead of tf.Variable being aware of strategies, we make strategies keep track of variables created while their scope was active. This change implements that (at least in terms of the public API for variables and dist strat). tf.Variable subclasses created by distribution strategy (e.g. DistributedVariable) still export a public `distribution_strategy` property. PiperOrigin-RevId: 229525171
Loading
Please sign in to comment