24.02.1
|
Function to run the direct convolution. More...
#include <NEDirectConvolutionLayer.h>
Public Member Functions | |
NEDirectConvolutionLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
NEDirectConvolutionLayer (const NEDirectConvolutionLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDirectConvolutionLayer & | operator= (const NEDirectConvolutionLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDirectConvolutionLayer (NEDirectConvolutionLayer &&)=delete | |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
NEDirectConvolutionLayer & | operator= (NEDirectConvolutionLayer &&)=delete |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
~NEDirectConvolutionLayer () | |
Default destructor. More... | |
void | configure (ITensor *input, const ITensor *weights, const ITensor *bias, ITensor *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Set the input, weights, biases and output tensors. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *bias, const ITensorInfo *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Static function to check if given info will lead to a valid configuration of NEDirectConvolutionLayer. More... | |
Function to run the direct convolution.
This function calls the following:
Definition at line 45 of file NEDirectConvolutionLayer.h.
NEDirectConvolutionLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 44 of file NEDirectConvolutionLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
default |
Default destructor.
void configure | ( | ITensor * | input, |
const ITensor * | weights, | ||
const ITensor * | bias, | ||
ITensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Set the input, weights, biases and output tensors.
Valid data layouts:
Valid data type configurations:
src0 | src1 | src2 | dst |
---|---|---|---|
F16 | F16 | F16 | F16 |
F32 | F32 | F32 | F32 |
[in,out] | input | Input tensor. Data types supported: F16/F32. |
[in] | weights | Set of kernels to convolve the input volume. Supported sizes: 1x1, 3x3 and 5x5. The 3rd dimension must be the same as the input's volume 3rd dimension. Data type supported: Same as input . |
[in] | bias | Set of biases. Can be nullptr. Data type supported: Same as input . |
[out] | output | Output tensor. The 3rd dimensions must be equal to the 4th dimension of the kernels tensor. Data types supported: Same as input . |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 50 of file NEDirectConvolutionLayer.cpp.
References arm_compute::test::validation::act_info, bias, arm_compute::test::validation::conv_info, ITensor::info(), and arm_compute::test::validation::input.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 76 of file NEDirectConvolutionLayer.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, arm_compute::ACL_SRC_2, ITensorPack::add_tensor(), and arm_compute::test::validation::pack.
|
static |
Static function to check if given info will lead to a valid configuration of NEDirectConvolutionLayer.
[in] | input | Input tensor. Data types supported: F16/F32. |
[in] | weights | Set of kernels to convolve the input volume. Supported sizes: 1x1, 3x3 and 5x5. The 3rd dimension must be the same as the input's volume 3rd dimension. Data type supported: Same as input . |
[in] | bias | Set of biases. Can be nullptr. Data type supported: Same as input . |
[in] | output | Output tensor. The 3rd dimensions must be equal to the 4th dimension of the kernels tensor. Data types supported: Same as input . |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 66 of file NEDirectConvolutionLayer.cpp.
References arm_compute::test::validation::act_info, bias, arm_compute::test::validation::conv_info, arm_compute::test::validation::input, and CpuDirectConv2d::validate().