Help protect the Great Barrier Reef with TensorFlow on Kaggle Join Challenge

CollectivePermute

public final class CollectivePermute

An Op to permute tensors across replicated TPU instances.

Each instance supplies its own input.

For example, suppose there are 4 TPU instances: `[A, B, C, D]`. Passing source_target_pairs=`[[0,1],[1,2],[2,3],[3,0]]` gets the outputs: `[D, A, B, C]`.

Public Methods

Output<T>
asOutput()
Returns the symbolic handle of a tensor.
static <T> CollectivePermute<T>
create(Scope scope, Operand<T> input, Operand<Integer> sourceTargetPairs)
Factory method to create a class wrapping a new CollectivePermute operation.
Output<T>
output()
The permuted input.

Inherited Methods

Public Methods

public Output<T> asOutput ()

Returns the symbolic handle of a tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static CollectivePermute<T> create (Scope scope, Operand<T> input, Operand<Integer> sourceTargetPairs)

Factory method to create a class wrapping a new CollectivePermute operation.

Parameters
scope current scope
input The local input to be permuted. Currently only supports float and bfloat16.
sourceTargetPairs A tensor with shape [num_pairs, 2].
Returns
  • a new instance of CollectivePermute

public Output<T> output ()

The permuted input.