Slice

Slice  // Produces a sub-tensor of its input.

Description

Takes a slice of an input tensor, i.e., the sub-tensor that resides within a bounding box, optionally with a stride.

Inputs

Name Element Type Shape
arg Any \(D=D_1, D_2, \ldots, D_n\).

Attributes

Name Description
lower_bounds The (inclusive) lower-bound coordinates \(L=L_1, L_2, \ldots, L_n.\)
upper_bounds The (exclusive) upper-bound coordinates \(U=U_1, U_2, \ldots, U_n.\)
strides The strides \(S=S_1, S_2, \ldots, S_n\) for the slices. Defaults to 1s.

Outputs

Name Element Type Shape
output Same as arg \(D'_i=\lceil\frac{U_i-L_i}{S_i}\rceil\).

Mathematical Definition

\[\mathtt{output}_I = \mathtt{arg}_{L+I*S}\]

where \(I=I_1, I_2, \ldots, I_n\) is a coordinate of the output.

C++ Interface

Warning

doxygenclass: Cannot find class “ngraph::op::Slice” in doxygen xml output for project “ngraph” from directory: ../../doxygen/xml