(distribution, value)
| 1121 | else: |
| 1122 | assert reduce_op is not None |
| 1123 | def merge_fn(distribution, value): |
| 1124 | self._last_step_outputs[name] = distribution.reduce(reduce_op, value, |
| 1125 | axis=None) |
| 1126 | # Setting this inside the `merge_fn` because all replicas share the same |
| 1127 | # context object, so it's more robust to set it only once (even if all |
| 1128 | # the replicas are trying to set the same value). |
| 1129 | self._last_step_outputs_reduce_ops[name] = reduce_op |
| 1130 | |
| 1131 | distribution_strategy_context.get_replica_context().merge_call( |
| 1132 | merge_fn, args=(output,)) |
nothing calls this directly
no test coverage detected