AIfES 2
2.0.0
|
AVR PGM implementation of the Leaky ReLU layer . More...
Go to the source code of this file.
Functions | |
ailayer_t * | ailayer_leaky_relu_q7_avr_pgm (ailayer_leaky_relu_q7_t *layer, ailayer_t *input_layer) |
Initializes and connect a Leaky ReLU layer with the Q7 AVR PGM implementation. More... | |
AVR PGM implementation of the Leaky ReLU layer .
AVR controller specific implementation of the Leaky ReLU layer in Q7 data-type. For more information about the Leaky ReLU layer refer to ailayer_leaky_relu.h.
Requires avr/pgmspace.h library
ailayer_t* ailayer_leaky_relu_q7_avr_pgm | ( | ailayer_leaky_relu_q7_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Leaky ReLU layer with the Q7 AVR PGM implementation.
The quantization parameters of the result tensor of the input layer must be defined constant in program memory (PROGMEM). The layer configuration is the same as with ailayer_leaky_relu_q7_default().
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 (alpha * min(input_layer.result), max(input_layer.result)].
Example: Create the layer structure of a pre-trained model (qparams must be set manually):
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. |