21.02
|
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 Neon kernels:
Definition at line 50 of file NEDirectConvolutionLayer.h.
NEDirectConvolutionLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 38 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.
[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 44 of file NEDirectConvolutionLayer.cpp.
References Tensor::allocator(), ARM_COMPUTE_ERROR_ON, Tensor::buffer(), NEActivationLayer::configure(), arm_compute::CONSTANT, ITensorInfo::data_layout(), Window::DimY, Window::DimZ, ActivationLayerInfo::enabled(), TensorAllocator::free(), ITensor::info(), arm_compute::NCHW, and arm_compute::UNKNOWN.
Referenced by arm_compute::test::validation::DATA_TEST_CASE().
|
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 Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 114 of file NEDirectConvolutionLayer.cpp.
References Window::DimY, Window::DimZ, Scheduler::get(), NEActivationLayer::run(), and IScheduler::schedule().
|
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 83 of file NEDirectConvolutionLayer.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_RETURN_ERROR_ON_MSG, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, ICloneable< T >::clone(), arm_compute::test::validation::data_type, ITensorInfo::data_type(), ITensorInfo::dimension(), ActivationLayerInfo::enabled(), ITensorInfo::num_dimensions(), NEDirectConvolutionLayerOutputStageKernel::validate(), NEDirectConvolutionLayerKernel::validate(), and NEActivationLayer::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), NEConvolutionLayer::get_convolution_method(), and NEConvolutionLayer::validate().