AIfES 2
2.0.0
|
Default implementation of the ELU layer . More...
Go to the source code of this file.
Data Structures | |
struct | ailayer_elu_f32 |
Data-type specific ELU layer struct for F32 . More... | |
struct | ailayer_elu_q31 |
Data-type specific ELU layer struct for Q31 . More... | |
struct | ailayer_elu_q7 |
Data-type specific ELU layer struct for Q7 . More... | |
Typedefs | |
typedef struct ailayer_elu_f32 | ailayer_elu_f32_t |
typedef struct ailayer_elu_q31 | ailayer_elu_q31_t |
typedef struct ailayer_elu_q7 | ailayer_elu_q7_t |
Functions | |
ailayer_t * | ailayer_elu_f32_default (ailayer_elu_f32_t *layer, ailayer_t *input_layer) |
Initializes and connect an ELU layer with the F32 default implementation. More... | |
ailayer_t * | ailayer_elu_q31_default (ailayer_elu_q31_t *layer, ailayer_t *input_layer) |
Initializes and connect a ELU layer with the Q31 default implementation. More... | |
ailayer_t * | ailayer_elu_q7_default (ailayer_elu_q7_t *layer, ailayer_t *input_layer) |
Initializes and connect a ELU layer with the Q7 default implementation. More... | |
void | ailayer_elu_calc_result_tensor_params_q31_default (ailayer_t *self) |
Calculate and set the quantization parameters for the result tensor of the ELU Q31 default implementation. More... | |
void | ailayer_elu_calc_result_tensor_params_q7_default (ailayer_t *self) |
Calculate and set the quantization parameters for the result tensor of the ELU Q7 default implementation. More... | |
Default implementation of the ELU layer .
Hardware independent implementations of the ELU layer in F32 data-type. For more information about the ELU layer refer to ailayer_elu.h.
void ailayer_elu_calc_result_tensor_params_q31_default | ( | ailayer_t * | self | ) |
Calculate and set the quantization parameters for the result tensor of the ELU Q31 default implementation.
Implementation of ailayer.calc_result_tensor_params.
The quantization parameters are pre-defined and the same as in the corresponding math function aimath_q31_default_elu().
*self | The layer structure |
void ailayer_elu_calc_result_tensor_params_q7_default | ( | ailayer_t * | self | ) |
Calculate and set the quantization parameters for the result tensor of the ELU Q7 default implementation.
Implementation of ailayer.calc_result_tensor_params.
The quantization parameters are pre-defined and the same as in the corresponding math function aimath_q7_default_elu().
*self | The layer structure |
ailayer_t* ailayer_elu_f32_default | ( | ailayer_elu_f32_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect an ELU layer with the F32 default implementation.
Example: Create the layer structure:
In C:
In C, C++ and on Arduino:
Example: Initialize and connect the layer:
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
ailayer_t* ailayer_elu_q31_default | ( | ailayer_elu_q31_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a ELU layer with the Q31 default implementation.
The quantization parameters of the result tensor are automatically set to {shift = input_layer.result.shift, zero_point = input_layer.result.zero_point} because the output values are in the interval (max(-alpha, min(input_layer.result)), max(input_layer.result)].
Example: Create the layer structure:
In C:
In C, C++ and on Arduino:
Example: Initialize and connect the layer:
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
ailayer_t* ailayer_elu_q7_default | ( | ailayer_elu_q7_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a ELU layer with the Q7 default implementation.
The quantization parameters of the result tensor are automatically set to {shift = input_layer.result.shift, zero_point = input_layer.result.zero_point} because the output values are in the interval (max(-alpha, min(input_layer.result)), max(input_layer.result)].
Example: Create the layer structure:
In C:
In C, C++ and on Arduino:
Example: Initialize and connect the layer:
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |