[][src]Trait opencv::hub_prelude::SliceLayerTrait

pub trait SliceLayerTrait: LayerTrait {
    pub fn as_raw_SliceLayer(&self) -> *const c_void;
pub fn as_raw_mut_SliceLayer(&mut self) -> *mut c_void; pub fn slice_ranges(&mut self) -> Vector<Vector<Range>> { ... }
pub fn set_slice_ranges(&mut self, val: Vector<Vector<Range>>) { ... }
pub fn axis(&self) -> i32 { ... }
pub fn set_axis(&mut self, val: i32) { ... }
pub fn num_split(&self) -> i32 { ... }
pub fn set_num_split(&mut self, val: i32) { ... } }

Slice layer has several modes:

  1. 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.

  1. 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], ...]

  1. Torch mode
  • axis: Axis of split operation

Split input blob on the equal parts by @p axis.

Required methods

Loading content...

Provided methods

pub fn slice_ranges(&mut self) -> Vector<Vector<Range>>[src]

Vector of slice ranges.

The first dimension equals number of output blobs. Inner vector has slice ranges for the first number of input dimensions.

pub fn set_slice_ranges(&mut self, val: Vector<Vector<Range>>)[src]

Vector of slice ranges.

The first dimension equals number of output blobs. Inner vector has slice ranges for the first number of input dimensions.

pub fn axis(&self) -> i32[src]

pub fn set_axis(&mut self, val: i32)[src]

pub fn num_split(&self) -> i32[src]

pub fn set_num_split(&mut self, val: i32)[src]

Loading content...

Implementors

impl SliceLayerTrait for SliceLayer[src]

impl SliceLayerTrait for PtrOfSliceLayer[src]

Loading content...