30#ifndef AILAYER_DENSE_DEFAULT
31#define AILAYER_DENSE_DEFAULT
39#define AILAYER_DENSE_F32_M(neurons, weights, bias) {{0,},0,neurons,{0,0,0,0,(float *) weights},{0,0,0,0,(float *) bias}}
40#define AILAYER_DENSE_F32_A(neurons) {{0,},0,neurons,{0,0,0,0,0},{0,0,0,0,0}}
41#define AILAYER_DENSE_Q31_M(neurons, weights, weights_qparams, bias, bias_qparams, result_qparams) {{0,0,0,0,0,0,{0,0,0,result_qparams,0}},0,neurons,{0,0,0,weights_qparams,(float *) weights},{0,0,0,bias_qparams,(float *) bias},}
42#define AILAYER_DENSE_Q31_A(neurons) {{0,},0,neurons,{0,0,0,0,0},{0,0,0,0,0}}
43#define AILAYER_DENSE_Q7_M(neurons, weights, weights_qparams, bias, bias_qparams, result_qparams) {{0,0,0,0,0,0,{0,0,0,result_qparams,0}},0,neurons,{0,0,0,weights_qparams,(float *) weights},{0,0,0,bias_qparams,(float *) bias},}
44#define AILAYER_DENSE_Q7_A(neurons) {{0,},0,neurons,{0,0,0,0,0},{0,0,0,0,0}}
Base layer implementation of the Dense layer.
ailayer_t * ailayer_dense_f32_default(ailayer_dense_f32_t *layer, ailayer_t *input_layer)
Initializes and connect a Dense layer with the F32 default implementation.
void ailayer_dense_quantize_q7_from_f32(ailayer_dense_f32_t *f32_layer_ptr, ailayer_dense_q7_t *q7_layer_ptr)
Convert a F32 dense layer to a Q7 representation.
ailayer_t * ailayer_dense_wt_q7_default(ailayer_dense_q7_t *layer, ailayer_t *input_layer)
Initializes and connect a Dense layer with the Q7 default implementation for transposed weights ten...
ailayer_t * ailayer_dense_q31_default(ailayer_dense_q31_t *layer, ailayer_t *input_layer)
Initializes and connect a Dense layer with the F32 default implementation.
ailayer_t * ailayer_dense_q7_default(ailayer_dense_q7_t *layer, ailayer_t *input_layer)
Initializes and connect a Dense layer with the Q7 default implementation.
Math functions for F32 data type, default implementation.
Math functions for Q31 data type, default implementation.
Math functions for Q7 data type, default implementation.
General Dense layer structure.
Definition: ailayer_dense.h:74
AIfES layer interface.
Definition: aifes_core.h:252