21.02
|
Function to execute a depthwise convolution. More...
#include <NEDepthwiseConvolutionLayer.h>
Public Member Functions | |
NEDepthwiseConvolutionLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
NEDepthwiseConvolutionLayer (const NEDepthwiseConvolutionLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDepthwiseConvolutionLayer (NEDepthwiseConvolutionLayer &&)=default | |
Default move constructor. More... | |
NEDepthwiseConvolutionLayer & | operator= (const NEDepthwiseConvolutionLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDepthwiseConvolutionLayer & | operator= (NEDepthwiseConvolutionLayer &&)=default |
Default move assignment operator. More... | |
~NEDepthwiseConvolutionLayer () | |
Default destructor. More... | |
void | configure (ITensor *input, const ITensor *weights, const ITensor *biases, ITensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, const ActivationLayerInfo &act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U)) |
Initialize the function's source, destination, weights and convolution information. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
void | prepare () override |
Prepare the function for executing. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, const ActivationLayerInfo &act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U)) |
Static function to check if given info will lead to a valid configuration of NEDepthwiseConvolutionLayer. More... | |
Function to execute a depthwise convolution.
Definition at line 40 of file NEDepthwiseConvolutionLayer.h.
NEDepthwiseConvolutionLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
Definition at line 340 of file NEDepthwiseConvolutionLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
default |
Default destructor.
void configure | ( | ITensor * | input, |
const ITensor * | weights, | ||
const ITensor * | biases, | ||
ITensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
unsigned int | depth_multiplier = 1 , |
||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() , |
||
const Size2D & | dilation = Size2D(1U, 1U) |
||
) |
Initialize the function's source, destination, weights and convolution information.
[in,out] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 |
[out] | output | Destination tensor. Data type supported: same as input . |
[in] | weights | Weights tensor. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as input or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when input is QASYMM8/QASYMM8_SIGNED. |
[in] | biases | Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as input , S32 when input is QASYMM8/QASYMM8_SIGNED. |
[in] | conv_info | Padding and stride information to use for the convolution. |
[in] | depth_multiplier | (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
[in] | dilation | (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). |
Definition at line 345 of file NEDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::test::validation::conv_info, arm_compute::GENERIC, ITensor::info(), and arm_compute::OPTIMIZED.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
overridevirtual |
Prepare the function for executing.
Any one off pre-processing step required by the function is handled here
Reimplemented from IFunction.
Definition at line 408 of file NEDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::GENERIC, and arm_compute::OPTIMIZED.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 393 of file NEDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::GENERIC, and arm_compute::OPTIMIZED.
|
static |
Static function to check if given info will lead to a valid configuration of NEDepthwiseConvolutionLayer.
[in] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 |
[in] | output | Destination tensor. Data type supported: same as input . |
[in] | weights | Weights tensor. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as input or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when input is QASYMM8/QASYMM8_SIGNED. |
[in] | biases | Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as input , S32 when input is QASYMM8/QASYMM8_SIGNED. |
[in] | conv_info | Padding and stride information to use for the convolution. |
[in] | depth_multiplier | (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
[in] | dilation | (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). |
Definition at line 362 of file NEDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::GENERIC, arm_compute::OPTIMIZED, and arm_compute::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE().