(self, *args, **kwargs)
| 1197 | return self.get().assign_sub(*args, **kwargs) |
| 1198 | |
| 1199 | def assign_add(self, *args, **kwargs): |
| 1200 | with _enter_or_assert_strategy(self._distribute_strategy): |
| 1201 | if distribution_strategy_context.in_cross_replica_context(): |
| 1202 | if self._aggregation == vs.VariableAggregation.SUM: |
| 1203 | raise ValueError( |
| 1204 | "SyncOnReadVariable does not support `assign_add` in " |
| 1205 | "cross-replica context when aggregation is set to " |
| 1206 | "`tf.VariableAggregation.SUM`.") |
| 1207 | return control_flow_ops.group(tuple( |
| 1208 | _assign_add_on_device(v.device, v, args[0]) for v in self._values)) |
| 1209 | else: |
| 1210 | return self.get().assign_add(*args, **kwargs) |
| 1211 | |
| 1212 | def assign(self, *args, **kwargs): |
| 1213 | with _enter_or_assert_strategy(self._distribute_strategy): |
nothing calls this directly
no test coverage detected