MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / merge_fn

Method merge_fn

tensorflow/python/distribute/input_lib.py:1123–1129  ·  view source on GitHub ↗
(distribution, value)

Source from the content-addressed store, hash-verified

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,))

Callers

nothing calls this directly

Calls 2

reduceMethod · 0.45

Tested by

no test coverage detected