Trait opencv::dnn::SliceLayerTraitConst [−][src]
pub trait SliceLayerTraitConst: LayerTraitConst {
fn as_raw_SliceLayer(&self) -> *const c_void;
fn slice_ranges(&self) -> Vector<Vector<Range>> { ... }
fn slice_steps(&self) -> Vector<Vector<i32>> { ... }
fn axis(&self) -> i32 { ... }
fn num_split(&self) -> i32 { ... }
}
Expand description
Slice layer has several modes:
- Caffe mode
Parameters
- axis: Axis of split operation
- slice_point: Array of split points
Number of output blobs equals to number of split points plus one. The first blob is a slice on input from 0 to @p slice_point[0] - 1 by @p axis, the second output blob is a slice of input from @p slice_point[0] to @p slice_point[1] - 1 by @p axis and the last output blob is a slice of input from @p slice_point[-1] up to the end of @p axis size.
- TensorFlow mode
- begin: Vector of start indices
- size: Vector of sizes
More convenient numpy-like slice. One and only output blob
is a slice input[begin[0]:begin[0]+size[0], begin[1]:begin[1]+size[1], ...]
- Torch mode
- axis: Axis of split operation
Split input blob on the equal parts by @p axis.
Required methods
fn as_raw_SliceLayer(&self) -> *const c_void
Provided methods
fn slice_ranges(&self) -> Vector<Vector<Range>>
fn slice_ranges(&self) -> Vector<Vector<Range>>
Vector of slice ranges.
The first dimension equals number of output blobs. Inner vector has slice ranges for the first number of input dimensions.