tf.compat.v1.tpu.replicate

View source on GitHub

Builds a graph operator that runs a replicated TPU computation.

tf.compat.v1.tpu.replicate(
    computation, inputs=None, infeed_queue=None, device_assignment=None, name=None,
    maximum_shapes=None
)

Args:

Returns:

A list of outputs, indexed by [replica_num] each output can be a nested structure same as what computation() returns with a few exceptions.

Exceptions include: 1) None output: a NoOp would be returned which control-depends on computation. 2) Single value output: A tuple containing the value would be returned. 3) Operation-only outputs: a NoOp would be returned which control-depends on computation. TODO(b/121383831): Investigate into removing these special cases.

Raises: