AIfES 2
2.0.0
|
Default implementation of the Conv2D layer . More...
Go to the source code of this file.
Typedefs | |
typedef struct ailayer_conv2d | ailayer_conv2d_f32_t |
Functions | |
ailayer_t * | ailayer_conv2d_f32_default (ailayer_conv2d_f32_t *layer, ailayer_t *input_layer) |
Initializes and connect a Conv2D layer with the F32 default implementation. More... | |
ailayer_t * | ailayer_conv2d_cfirst_f32_default (ailayer_conv2d_f32_t *layer, ailayer_t *input_layer) |
Initializes and connect a Conv2D layer (channels first) with the F32 default implementation. More... | |
ailayer_t * | ailayer_conv2d_chw_f32_default (ailayer_conv2d_f32_t *layer, ailayer_t *input_layer) |
Initializes and connect a Conv2D layer (channels first) with the F32 default implementation. More... | |
ailayer_t * | ailayer_conv2d_clast_f32_default (ailayer_conv2d_f32_t *layer, ailayer_t *input_layer) |
Initializes and connect a Conv2D layer (channels last) with the F32 default implementation. More... | |
ailayer_t * | ailayer_conv2d_hwc_f32_default (ailayer_conv2d_f32_t *layer, ailayer_t *input_layer) |
Initializes and connect a Conv2D layer (channels last) with the F32 default implementation. More... | |
void | ailayer_conv2d_init_params_f32_default (ailayer_t *self) |
F32 default implementation of the ailayer.init_params function for the Conv2D layer More... | |
Default implementation of the Conv2D layer .
Hardware independent implementations of the Conv2D layer in F32 data-type. For more information about the Conv2D layer refer to ailayer_conv2d.h.
ailayer_t* ailayer_conv2d_cfirst_f32_default | ( | ailayer_conv2d_f32_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Conv2D layer (channels first) with the F32 default implementation.
Code examples are given in the description of ailayer_conv2d_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
ailayer_t* ailayer_conv2d_chw_f32_default | ( | ailayer_conv2d_f32_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Conv2D layer (channels first) with the F32 default implementation.
Code examples are given in the description of ailayer_conv2d_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
ailayer_t* ailayer_conv2d_clast_f32_default | ( | ailayer_conv2d_f32_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Conv2D layer (channels last) with the F32 default implementation.
Code examples are given in the description of ailayer_conv2d_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
ailayer_t* ailayer_conv2d_f32_default | ( | ailayer_conv2d_f32_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Conv2D layer with the F32 default implementation.
Example: Create the layer structure with pretrained weights:
In C:
In C, C++ and on Arduino:
Example: Create the layer structure for automatic parameter distribution:
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
Example: Initialize and connect the layer for data with channels last (all options are equivalent):
or
or
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
ailayer_t* ailayer_conv2d_hwc_f32_default | ( | ailayer_conv2d_f32_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Conv2D layer (channels last) with the F32 default implementation.
Code examples are given in the description of ailayer_conv2d_f32_default().
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
void ailayer_conv2d_init_params_f32_default | ( | ailayer_t * | self | ) |
F32 default implementation of the ailayer.init_params function for the Conv2D layer
Implementation of ailayer.init_params.
The function will initialize the weights and bias depending on the following activation function.
Activation function | Weights-init | Bias-init |
---|---|---|
None, tanh, logistic, softmax | Glorot | Zeros |
ReLu and variants | He | Zeros |
*self | The layer structure |