Class cv::dnn::SliceLayer#
#include <opencv2/dnn/all_layers.hpp>Collaboration diagram for cv::dnn::SliceLayer:
Public Member Functions#
Public Member Functions inherited from cv::dnn::Layer
Return |
Name |
Description |
|---|---|---|
Initializes only name, type and blobs fields. |
||
|
||
|
||
|
||
|
||
|
|
Computes and sets internal parameters according to inputs, outputs and blobs. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
|
Computes and sets internal parameters according to inputs, outputs and blobs. |
|
|
Given the input blobs, computes the output blobs. |
|
|
Given the input blobs, computes the output blobs. |
|
Given the input blobs, computes the output blobs. |
|
|
||
|
||
|
||
|
Returns parameters of layers with channel-wise multiplication and addition. |
|
|
Returns scale and zeropoint of layers. |
|
|
||
|
Returns a CANN backend node. |
|
|
Returns a CUDA backend node. |
|
|
||
|
Returns a TimVX backend node. |
|
|
||
|
||
|
Returns index of input blob into the input array. |
|
|
||
|
Returns index of output blob in output array. |
|
|
Allocates layer and computes output. |
|
|
Tries to attach to the layer the subsequent activation layer, i.e. do the layer fusion in a partial case. |
|
|
Initializes only name, type and blobs fields. |
|
|
Ask layer if it support specific backend for doing computations. |
|
|
Try to fuse current layer with a next one. |
|
|
“Detaches” all the layers, attached to particular layer. |
|
|
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Public Attributes#
Public Attributes inherited from cv::dnn::Layer
Return |
Name |
Description |
|---|---|---|
|
List of learned parameters must be stored here to allow read them by using Net::getParam(). |
|
|
||
Name of the layer instance, can be used for logging or other internal purposes. |
||
|
||
|
||
|
prefer target for layer forwarding |
|
Type name which was used for creating layer by layer factory. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
Slice layer has several modes:
Caffe mode
Number of output blobs equals to number of split points plus one. The first blob is a slice on input from 0 to
slice_point[0] - 1 byaxis, the second output blob is a slice of input fromslice_point[0] toslice_point[1] - 1 byaxisand the last output blob is a slice of input fromslice_point[-1] up to the end ofaxissize.TensorFlow mode
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
Split input blob on the equal parts by
axis.
- Param axis:
[in] Axis of split operation
- Param slice_point:
[in] Array of split points
- Param begin:
Vector of start indices
- Param size:
Vector of sizes
- Param axis:
Axis of split operation
Member Function Documentation#
create()#
static Ptr< SliceLayer > cv::dnn::SliceLayer::create(const LayerParams & params)
Member Data Documentation#
axis#
int cv::dnn::SliceLayer::axis
num_split#
int cv::dnn::SliceLayer::num_split
sliceRanges#
std::vector< std::vector< Range > > cv::dnn::SliceLayer::sliceRanges
Vector of slice ranges.
The first dimension equals number of output blobs. Inner vector has slice ranges for the first number of input dimensions.
sliceSteps#
std::vector< std::vector< int > > cv::dnn::SliceLayer::sliceSteps
Source file#
The documentation for this class was generated from the following file:
opencv2/dnn/all_layers.hpp