21.08
|
Basic function to simulate a convolution layer. More...
#include <NEWinogradConvolutionLayer.h>
Public Member Functions | |
NEWinogradConvolutionLayer (const std::shared_ptr< IMemoryManager > &memory_manager=nullptr) | |
Constructor. More... | |
NEWinogradConvolutionLayer (const NEWinogradConvolutionLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEWinogradConvolutionLayer (NEWinogradConvolutionLayer &&)=default | |
Default move constructor. More... | |
NEWinogradConvolutionLayer & | operator= (const NEWinogradConvolutionLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEWinogradConvolutionLayer & | operator= (NEWinogradConvolutionLayer &&)=default |
Default move assignment operator. More... | |
~NEWinogradConvolutionLayer () | |
Destructor. More... | |
void | configure (const ITensor *input, const ITensor *weights, const ITensor *biases, ITensor *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false) |
Set the input and output tensors. 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, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false) |
Static function to check if given info will lead to a valid configuration of NEWinogradConvolutionLayer. More... | |
Basic function to simulate a convolution layer.
This function calls the following kernels:
Definition at line 49 of file NEWinogradConvolutionLayer.h.
NEWinogradConvolutionLayer | ( | const std::shared_ptr< IMemoryManager > & | memory_manager = nullptr | ) |
Constructor.
Definition at line 57 of file NEWinogradConvolutionLayer.cpp.
References NEWinogradConvolutionLayer::~NEWinogradConvolutionLayer().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
default |
Destructor.
Referenced by NEWinogradConvolutionLayer::NEWinogradConvolutionLayer().
void configure | ( | const ITensor * | input, |
const ITensor * | weights, | ||
const ITensor * | biases, | ||
ITensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() , |
||
bool | enable_fast_math = false |
||
) |
Set the input and output tensors.
Valid data layouts:
Valid data type configurations:
src0 | src1 | src2 | dst |
---|---|---|---|
F16 | F16 | F16 | F16 |
F32 | F32 | F32 | F32 |
[in] | input | Source tensor. 3 lower dimensions represent a single input [width, height, IFM], while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F16/F32. |
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: Same as input . Currently only 3x3 and 5x5 kernels are supported. |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as weights . |
[out] | output | Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. Data types supported: Same as input . |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. Currently only unit strides are supported. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
[in] | enable_fast_math | (Optional) Enable fast math computation. In case this flag were set, the function could dispatch the fastest implementation available which may introduce a drop of accuracy as well. Default is false |
Definition at line 65 of file NEWinogradConvolutionLayer.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, arm_compute::ACL_SRC_2, arm_compute::test::validation::conv_info, and ITensor::info().
|
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 92 of file NEWinogradConvolutionLayer.cpp.
Referenced by NEWinogradConvolutionLayer::run().
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 78 of file NEWinogradConvolutionLayer.cpp.
References NEWinogradConvolutionLayer::prepare().
|
static |
Static function to check if given info will lead to a valid configuration of NEWinogradConvolutionLayer.
Similar to NEWinogradConvolutionLayer::configure()
Definition at line 86 of file NEWinogradConvolutionLayer.cpp.
References CpuWinogradConv2d::validate().