T
- data type for outputValues()
output@Operator(group="sparse") public final class SparseReorder<T> extends PrimitiveOp
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`.
operation
Modifier and Type | Method and Description |
---|---|
static <T> SparseReorder<T> |
create(Scope scope,
Operand<Long> inputIndices,
Operand<T> inputValues,
Operand<Long> inputShape)
Factory method to create a class wrapping a new SparseReorder operation.
|
Output<Long> |
outputIndices()
2-D.
|
Output<T> |
outputValues()
1-D.
|
equals, hashCode, op, toString
public static <T> SparseReorder<T> create(Scope scope, Operand<Long> inputIndices, Operand<T> inputValues, Operand<Long> inputShape)
scope
- current scopeinputIndices
- 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.public Output<Long> outputIndices()
Copyright © 2022. All rights reserved.