SparseSlice

public final class SparseSlice

Slice a `SparseTensor` based on the `start` and `size`.

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 ] [ ]

Constants

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

Public Methods

static <T extends TType> SparseSlice<T>
create(Scope scope, Operand<TInt64> indices, Operand<T> values, Operand<TInt64> shape, Operand<TInt64> start, Operand<TInt64> size)
Factory method to create a class wrapping a new SparseSlice operation.
Output<TInt64>
Output<TInt64>
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.

Inherited Methods

org.tensorflow.op.RawOp
final boolean
equals(Object obj)
final int
Operation
op()
Return this unit of computation as a single Operation.
final String
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.op.Op
abstract ExecutionEnvironment
env()
Return the execution environment this op was created in.
abstract Operation
op()
Return this unit of computation as a single Operation.

Constants

public static final String OP_NAME

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

Constant Value: "SparseSlice"

Public Methods

public static SparseSlice<T> create (Scope scope, Operand<TInt64> indices, Operand<T> values, Operand<TInt64> shape, Operand<TInt64> start, Operand<TInt64> size)

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

Parameters
scope current scope
indices 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.
Returns
  • a new instance of SparseSlice

public Output<TInt64> outputIndices ()

public Output<TInt64> outputShape ()

A list of 1-D tensors represents the shape of the output sparse tensors.

public Output<T> outputValues ()

A list of 1-D tensors represents the values of the output sparse tensors.