| AIfES 2 2.0.0

ailayer_batch_normalization_default.h
Go to the documentation of this file.
1
27 #ifndef AILAYER_BATCH_NORM_DEFAULT
28 #define AILAYER_BATCH_NORM_DEFAULT
29
30 #include "cnn/base/ailayer/ailayer_batch_normalization.h"
31 #include "basic/default/aimath/aimath_f32_default.h"
32 #include "cnn/default/aimath/aimath_cnn_f32_default.h"
33
34 #define AILAYER_BATCH_NORM_F32_M(momentum, eps, moving_mean, moving_variance, beta, gamma) \
35 {{{0,},0,0,0,{0,0,0,0,(float *) beta},{0,0,0,0,(float *) gamma}, \
36 {0,0,0,0,(float *) moving_mean},{0,0,0,0,(float *) moving_variance} }, momentum, eps}
37 #define AILAYER_BATCH_NORM_F32_A(momentum, eps) {{{0,}}, momentum, eps}
38
39
40 typedef struct ailayer_batch_norm_f32 ailayer_batch_norm_f32_t;
41
46 struct ailayer_batch_norm_f32 {
47 ailayer_batch_norm_t base;
49 aiscalar_f32_t momentum;
50 aiscalar_f32_t eps;
51 };
52
145 ailayer_t *ailayer_batch_norm_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer);
146
155 ailayer_t *ailayer_batch_norm_cfirst_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer);
156
165 ailayer_t *ailayer_batch_norm_chw_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer);
166
175 ailayer_t *ailayer_batch_norm_cl_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer);
176
177
186 ailayer_t *ailayer_batch_norm_clast_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer);
187
196 ailayer_t *ailayer_batch_norm_hwc_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer);
197
206 ailayer_t *ailayer_batch_norm_lc_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer);
207
208
217 void ailayer_batch_norm_init_params_f32_default(ailayer_t *self);
218
219 #endif // AILAYER_BATCH_NORM_DEFAULT
ailayer_batch_normalization.h
Base layer implementation of the Batch Normalization layer.
ailayer_batch_norm_f32_default
ailayer_t * ailayer_batch_norm_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Batch Normalization layer with the F32 default implementation.
ailayer_batch_norm_cfirst_f32_default
ailayer_t * ailayer_batch_norm_cfirst_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Batch Normalization layer (channels first) with the F32 default implement...
ailayer_batch_norm_clast_f32_default
ailayer_t * ailayer_batch_norm_clast_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Batch Normalization layer (channels last) with the F32 default implementa...
ailayer_batch_norm_lc_f32_default
ailayer_t * ailayer_batch_norm_lc_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Batch Normalization layer (channels first) with the F32 default implement...
ailayer_batch_norm_hwc_f32_default
ailayer_t * ailayer_batch_norm_hwc_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Batch Normalization layer (channels first) with the F32 default implement...
ailayer_batch_norm_cl_f32_default
ailayer_t * ailayer_batch_norm_cl_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Batch Normalization layer (channels first) with the F32 default implement...
ailayer_batch_norm_init_params_f32_default
void ailayer_batch_norm_init_params_f32_default(ailayer_t *self)
F32 default implementation of the ailayer.init_params function for the Batch Normalization layer
ailayer_batch_norm_chw_f32_default
ailayer_t * ailayer_batch_norm_chw_f32_default(ailayer_batch_norm_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Batch Normalization layer (channels first) with the F32 default implement...
aimath_cnn_f32_default.h
Math functions for F32 data type, CNN-specific implementation.
aiscalar_f32_t
float aiscalar_f32_t
Scalar for F32 (aif32) data-type.
Definition: aimath_f32.h:120
aimath_f32_default.h
Math functions for F32 data type, default implementation.
ailayer_batch_norm_f32
Data-type specific Batch Normalization layer struct for F32 .
Definition: ailayer_batch_normalization_default.h:46
ailayer_batch_norm_f32::base
ailayer_batch_norm_t base
Inherited field members from general layer struct.
Definition: ailayer_batch_normalization_default.h:47
ailayer_batch_norm_f32::eps
aiscalar_f32_t eps
Storage for ailayer_batch_norm.eps scalar in F32.
Definition: ailayer_batch_normalization_default.h:50
ailayer_batch_norm_f32::momentum
aiscalar_f32_t momentum
Storage for ailayer_batch_norm.momentum scalar in F32.
Definition: ailayer_batch_normalization_default.h:49
ailayer_batch_norm
General Batch Normalization layer structure.
Definition: ailayer_batch_normalization.h:75
ailayer
AIfES layer interface.
Definition: aifes_core.h:252