T
- data type for outputValues()
output@Operator(group="sparse") public final class SparseSlice<T> extends PrimitiveOp
For example, if the input is
input_tensor = shape = [2, 7] [ a d e ] [b c ]
Graphically the output tensors are:
sparse_slice([0, 0], [2, 4]) = shape = [2, 4] [ a ] [b c ]
sparse_slice([0, 4], [2, 3]) = shape = [2, 3] [ d e ] [ ]
operation
Modifier and Type | Method and Description |
---|---|
static <T> SparseSlice<T> |
create(Scope scope,
Operand<Long> indices,
Operand<T> values,
Operand<Long> shape,
Operand<Long> start,
Operand<Long> size)
Factory method to create a class wrapping a new SparseSlice operation.
|
Output<Long> |
outputIndices() |
Output<Long> |
outputShape()
A list of 1-D tensors represents the shape of the output sparse
tensors.
|
Output<T> |
outputValues()
A list of 1-D tensors represents the values of the output sparse
tensors.
|
equals, hashCode, op, toString
public static <T> SparseSlice<T> create(Scope scope, Operand<Long> indices, Operand<T> values, Operand<Long> shape, Operand<Long> start, Operand<Long> size)
scope
- current scopeindices
- 2-D tensor represents the indices of the sparse tensor.values
- 1-D tensor represents the values of the sparse tensor.shape
- 1-D. tensor represents the shape of the sparse tensor.start
- 1-D. tensor represents the start of the slice.size
- 1-D. tensor represents the size of the slice.
output indices: A list of 1-D tensors represents the indices of the output
sparse tensors.public Output<T> outputValues()
Copyright © 2022. All rights reserved.