24.02.1
|
Wrapper function to first apply {NE, CL}BatchNormalizationLayer on the weights and then run {NE, CL}DepthwiseConvolutionLayer with the modified weights. More...
#include <FusedDepthwiseConvolutionBatchNormalizationFunction.h>
Public Types | |
using | TensorType = typename TargetInfo::TensorType |
using | TensorConcreteType = typename TargetInfo::TensorConcreteType |
Public Member Functions | |
FusedDepthwiseConvolutionBatchNormalizationFunction (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
void | configure (TensorType *input, TensorType *weights, TensorType *bias, TensorType *output, const TensorType *mean, const TensorType *var, const TensorType *beta, const TensorType *gamma, float epsilon, const PadStrideInfo &conv_info, unsigned int depth_multiplier, ActivationLayerInfo const &fused_act) |
Set the input and output tensors. More... | |
void | run () |
Run the kernels contained in the function. More... | |
void | prepare () |
Prepare the function for executing. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
Wrapper function to first apply {NE, CL}BatchNormalizationLayer on the weights and then run {NE, CL}DepthwiseConvolutionLayer with the modified weights.
Definition at line 39 of file FusedDepthwiseConvolutionBatchNormalizationFunction.h.
using TensorConcreteType = typename TargetInfo::TensorConcreteType |
Definition at line 43 of file FusedDepthwiseConvolutionBatchNormalizationFunction.h.
using TensorType = typename TargetInfo::TensorType |
Definition at line 42 of file FusedDepthwiseConvolutionBatchNormalizationFunction.h.
|
inline |
Definition at line 45 of file FusedDepthwiseConvolutionBatchNormalizationFunction.h.
|
inline |
Set the input and output tensors.
[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. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as input . |
[in] | bias | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [IFM]. Data type supported: Should match input data type. |
[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] | mean | Mean values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as input |
[in] | var | Variance values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as input |
[in] | beta | Beta values tensor info. 1 dimension with size equal to the feature maps [FM]. If not provided, default value for beta is 0. Data types supported: Same as input |
[in] | gamma | Gamma values tensor info. 1 dimension with size equal to the feature maps [FM]. If not provided, default value for gamma is 1. Data types supported: Same as input |
[in] | epsilon | Small value to avoid division with zero. Default value is 0.001f. |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
[in] | depth_multiplier | Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. |
[in] | fused_act | Activation layer information in case of a fused activation. |
Definition at line 70 of file FusedDepthwiseConvolutionBatchNormalizationFunction.h.
References bias, arm_compute::test::validation::conv_info, arm_compute::DEPTHWISECONVOLUTION, ActivationLayerInfo::enabled(), arm_compute::quantization::epsilon, arm_compute::test::validation::has_bias, and arm_compute::test::validation::input.
|
inlinevirtual |
Prepare the function for executing.
Any one off pre-processing step required by the function is handled here
Reimplemented from IFunction.
Definition at line 118 of file FusedDepthwiseConvolutionBatchNormalizationFunction.h.
Referenced by FusedDepthwiseConvolutionBatchNormalizationFunction< TargetInfo, FusedLayerTypes >::run().
|
inlinevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 112 of file FusedDepthwiseConvolutionBatchNormalizationFunction.h.
References FusedDepthwiseConvolutionBatchNormalizationFunction< TargetInfo, FusedLayerTypes >::prepare().