AIfES 2
2.0.0
|
Default implementation of the Batch Normalization layer . More...
Go to the source code of this file.
Data Structures | |
struct | ailayer_batch_norm_f32 |
Data-type specific Batch Normalization layer struct for F32 . More... | |
Typedefs | |
typedef struct ailayer_batch_norm_f32 | ailayer_batch_norm_f32_t |
Default implementation of the Batch Normalization layer .
Hardware independent implementations of the Batch Normalization layer in F32 data-type.
For more information about the Batch Normalization layer refer to ailayer_batch_normalization.h.
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 implementation.
Code examples are given in the description of ailayer_batch_norm_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
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 implementation.
Code examples are given in the description of ailayer_batch_norm_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
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 implementation.
Code examples are given in the description of ailayer_batch_norm_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
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 implementation.
Code examples are given in the description of ailayer_batch_norm_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
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.
Example: Create the layer structure with pretrained weights, means and variances:
In C:
In C, C++ and on Arduino:
Example: Create the layer structure for automatic parameter distribution (e.g. for training):
In C:
In C, C++ and on Arduino:
Example: Initialize and connect the layer for data with channels first (all options are equivalent):
or
or
or
Example: Initialize and connect the layer for data with channels last (all options are equivalent):
or
or
or
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
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 implementation.
Code examples are given in the description of ailayer_batch_norm_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
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
Implementation of ailayer.init_params.
The function will initialize the tensors for moving_means and betas with zeros and for moving_variances and gammas with ones.
*self | The layer structure |
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 implementation.
Code examples are given in the description of ailayer_batch_norm_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |