T
- data type for output()
output@Operator public final class Slice<T> extends PrimitiveOp implements Operand<T>
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)
operation
Modifier and Type | Method and Description |
---|---|
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T,U extends Number> |
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> |
output() |
equals, hashCode, op, toString
public static <T,U extends Number> Slice<T> create(Scope scope, Operand<T> input, Operand<U> begin, Operand<U> size)
scope
- current scopeinput
- 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]).public Output<T> asOutput()
Operand
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.
asOutput
in interface Operand<T>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.