Slice

public final class Slice

Return a slice from 'input'.

The output tensor is a tensor with dimensions described by 'size' whose values are extracted from 'input' starting at the offsets in 'begin'.

Requirements : 0 <= begin[i] <= begin[i] + size[i] <= Di for i in [0, n)

Constants

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

Public Methods

Output <T>
asOutput ()
Returns the symbolic handle of the tensor.
static <T extends TType , U extends TNumber > Slice <T>
create ( Scope scope, Operand <T> input, Operand <U> begin, Operand <U> size)
Factory method to create a class wrapping a new Slice operation.
Output <T>

Inherited Methods

Constants

public static final String OP_NAME

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

Constant Value: "Slice"

Public Methods

public Output <T> asOutput ()

Returns the symbolic handle of the tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static Slice <T> create ( Scope scope, Operand <T> input, Operand <U> begin, Operand <U> size)

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

Parameters
scope current scope
begin begin[i] specifies the offset into the 'i'th dimension of 'input' to slice from.
size size[i] specifies the number of elements of the 'i'th dimension of 'input' to slice. If size[i] is -1, all remaining elements in dimension i are included in the slice (i.e. this is equivalent to setting size[i] = input.dim_size(i) - begin[i]).
Returns
  • a new instance of Slice

public Output <T> output ()