AIfES 2
2.0.0
|
Implementation of the Dense layer with parameters in PROGMEM for AVR contoller. More...
Go to the source code of this file.
Functions | |
ailayer_t * | ailayer_dense_f32_avr_pgm (ailayer_dense_f32_t *layer, ailayer_t *input_layer) |
Initializes and connect a Dense layer with the F32 AVR PGM implementation. More... | |
ailayer_t * | ailayer_dense_q7_avr_pgm (ailayer_dense_q7_t *layer, ailayer_t *input_layer) |
Initializes and connect a Dense layer with the Q7 AVR PGM implementation. More... | |
ailayer_t * | ailayer_dense_wt_q7_avr_pgm (ailayer_dense_q7_t *layer, ailayer_t *input_layer) |
Initializes and connect a Dense layer with the Q7 AVR PGM implementation. More... | |
Implementation of the Dense layer with parameters in PROGMEM for AVR contoller.
AVR controller implementations of the Dense layer in F32 and Q7 data-type. For more information about the Dense layer refer to ailayer_dense.h.
This implementation allows access of weights and biases directly from the program memory of AVR controllers. This is useful if there are too many weights to fit into the RAM.
Requires avr/pgmspace.h library
ailayer_t* ailayer_dense_f32_avr_pgm | ( | ailayer_dense_f32_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Dense layer with the F32 AVR PGM implementation.
The weights and bias have to be defined constant in program memory (PROGMEM). The rest of the layer configuration is the same as with ailayer_dense_f32_default().
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:
*layer | The layer structure to initialize. |
*input_layer | The prior layer. |
ailayer_t* ailayer_dense_q7_avr_pgm | ( | ailayer_dense_q7_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Dense layer with the Q7 AVR PGM implementation.
The weights, bias and quantization parameter have to be defined constant in program memory (PROGMEM). The rest of the layer configuration is the same as with ailayer_dense_q7_default().
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 (parameter buffer must be in PROGMEM):
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_dense_wt_q7_avr_pgm | ( | ailayer_dense_q7_t * | layer, |
ailayer_t * | input_layer | ||
) |
Initializes and connect a Dense layer with the Q7 AVR PGM implementation.
This implementation is the same as ailayer_dense_q7_avr_pgm() but with a transposed weights matrix/tensor.
The weights, bias and quantization parameter have to be defined constant in program memory (PROGMEM). The rest of the layer configuration is the same as with ailayer_dense_q7_default().
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 (parameter buffer must be in PROGMEM):
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. |