tf.contrib.tpu.cross_replica_sum( input, group_assignment=, name=None )
Defined in generated file:
An Op to sum inputs across replicated TPU instances. Each
instance supplies its own input. If group_assignment is empty, the output of each is the sum of all the inputs, otherwise the output of each is the sum of the inputs belonging to the same group.
For example, suppose there are 4 TPU instances:
[A, B, C, D]. Passing
A, C as group 0, and
B, D as group 1.
Thus we get the outputs:
[A+C, B+D, A+C, B+D].
Tensor. Must be one of the following types:
float32. The local input to the sum.
group_assignment: An optional list of
ints. Defaults to
. The list of group ids.
group_assignment[i]represents the group id of replica i.
name: A name for the operation (optional).
Tensor. Has the same type as
The sum of all the distributed inputs.