W3cubDocs

/TensorFlow Python

tf.contrib.tpu.cross_replica_sum

tf.contrib.tpu.cross_replica_sum(
    input,
    name=None
)

Defined in tensorflow/contrib/tpu/ops/gen_tpu_ops.py.

An Op to sum inputs across replicated TPU instances. Each

instance supplies its own input, and the output of each is the sum of all the inputs.

Args:

  • input: A Tensor. Must be one of the following types: bfloat16, float32. The local input to the sum.
  • name: A name for the operation (optional).

Returns:

A Tensor. Has the same type as input. The sum of all the distributed inputs.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/tpu/cross_replica_sum