tf.raw_ops.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.

input_indices A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.
input_values A Tensor. 1-D. N non-empty values corresponding to input_indices.
input_shape A Tensor of type int64. 1-D. Shape of the input SparseTensor.
name A name for the operation (optional).

A tuple of Tensor objects (output_indices, output_values).
output_indices A Tensor of type int64.
output_values A Tensor. Has the same type as input_values.