(self, *args, **kwargs)
| 1184 | strategy, device_map, values, logical_device=logical_device) |
| 1185 | |
| 1186 | def assign_sub(self, *args, **kwargs): |
| 1187 | with _enter_or_assert_strategy(self._distribute_strategy): |
| 1188 | if distribution_strategy_context.in_cross_replica_context(): |
| 1189 | if self._aggregation == vs.VariableAggregation.SUM: |
| 1190 | raise ValueError( |
| 1191 | "SyncOnReadVariable does not support `assign_sub` in " |
| 1192 | "cross-replica context when aggregation is set to " |
| 1193 | "`tf.VariableAggregation.SUM`.") |
| 1194 | return control_flow_ops.group(tuple( |
| 1195 | _assign_sub_on_device(v.device, v, args[0]) for v in self._values)) |
| 1196 | else: |
| 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): |
nothing calls this directly
no test coverage detected