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)
Public Methods
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T, U extends Number> Slice<T> | |
Output<T> |
output()
|
Inherited Methods
Public Methods
public Output<T> asOutput ()
Returns the symbolic handle of a 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