25 #ifndef ARM_COMPUTE_GRAPH_BACKENDS_FUSED_CONVOLUTION_BATCH_NORMAZLIZATION_FUNCTION_H 26 #define ARM_COMPUTE_GRAPH_BACKENDS_FUSED_CONVOLUTION_BATCH_NORMAZLIZATION_FUNCTION_H 38 template <
typename TargetInfo,
typename FusedLayerTypes>
46 : _conv_layer(memory_manager), _fused_batch_norm_layer(), _fused_bias(), _is_prepared(false)
83 const bool has_bias = (bias !=
nullptr);
90 _fused_batch_norm_layer.configure(weights, mean, var,
nullptr,
nullptr, bias, beta, gamma, epsilon);
95 _fused_batch_norm_layer.configure(weights, mean, var,
nullptr, &_fused_bias,
nullptr, beta, gamma, epsilon);
96 bias_to_use = &_fused_bias;
99 _conv_layer.configure(input, weights, bias_to_use, output, conv_info,
WeightsInfo(),
Size2D(1
U, 1
U), fused_act, fast_math, num_groups);
103 _fused_bias.allocator()->allocate();
118 _fused_batch_norm_layer.run();
125 typename FusedLayerTypes::FuseBatchNormalization _fused_batch_norm_layer;
Base class for all functions.
typename TargetInfo::TensorType TensorType
typename TargetInfo::TensorConcreteType TensorConcreteType
Wrapper function to first apply {NE, CL}BatchNormalizationLayer on the weights and then run {NE...
FusedConvolutionBatchNormalizationFunction(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Activation Layer Information class.
Copyright (c) 2017-2023 Arm Limited.
Convolution Layer Weights Information class.
const unsigned int num_groups
Padding and stride information class.
void prepare()
Prepare the function for executing.
Class for specifying the size of an image or rectangle.
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 num_groups, bool fast_math, ActivationLayerInfo const &fused_act)
Set the input and output tensors.
void run()
Run the kernels contained in the function.