SparseReorder

public final class SparseReorder

Reorders a SparseTensor into the canonical, row-major ordering.

Note that by convention, all sparse ops preserve the canonical ordering along increasing dimension number. The only time ordering can be violated is during manual manipulation of the indices and values vectors to add entries.

Reordering does not affect the shape of the SparseTensor.

If the tensor has rank `R` and `N` non-empty values, `input_indices` has shape `[N, R]`, input_values has length `N`, and input_shape has length `R`.

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

static <T extends TType> SparseReorder<T>
create(Scope scope, Operand<TInt64> inputIndices, Operand<T> inputValues, Operand<TInt64> inputShape)
Factory method to create a class wrapping a new SparseReorder operation.
Output<TInt64>
outputIndices()
2-D.
Output<T>
outputValues()
1-D.

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "SparseReorder"

Public Methods

public static SparseReorder<T> create (Scope scope, Operand<TInt64> inputIndices, Operand<T> inputValues, Operand<TInt64> inputShape)

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

Parameters
scope current scope
inputIndices 2-D. `N x R` matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.
inputValues 1-D. `N` non-empty values corresponding to `input_indices`.
inputShape 1-D. Shape of the input SparseTensor.
Returns
  • a new instance of SparseReorder

public Output<TInt64> outputIndices ()

2-D. `N x R` matrix with the same indices as input_indices, but in canonical row-major ordering.

public Output<T> outputValues ()

1-D. `N` non-empty values corresponding to `output_indices`.