AIfES 2  2.0.0
aifes_express_f32_fnn.h
Go to the documentation of this file.
1 
26 #ifndef EXPRESS_FNN_F32
27 #define EXPRESS_FNN_F32
28 
29 #include "core/aifes_math.h"
30 
33 typedef enum
34 {
45 
48 typedef enum
49 {
54 
57 typedef enum
58 {
63 
66 typedef enum
67 {
73 
76 typedef enum
77 {
78  AIfES_E_early_stopping_off,
79  AIfES_E_early_stopping_on
80 
82 
108  uint32_t layer_count;
109  uint32_t *fnn_structure;
111  void * flat_weights;
112 };
113 
141  float learn_rate;
142  float sgd_momentum;
143  uint32_t batch_size;
144  uint32_t epochs;
161  void (*loss_print_function)(float);
164 };
165 
188 };
189 
191 
193 
195 
196 
204 uint32_t AIFES_E_flat_weights_number_fnn_f32(uint32_t *fnn_structure,uint32_t layer_count);
205 
206 
207 
264  AIFES_E_model_parameter_fnn_f32 *AIFES_E_fnn,
265  aitensor_t *output_tensor);
266 
267 
366  aitensor_t *target_tensor,
367  AIFES_E_model_parameter_fnn_f32 *AIFES_E_fnn,
368  AIFES_E_training_parameter_fnn_f32 *AIFES_E_fnn_training,
369  AIFES_E_init_weights_parameter_fnn_f32 *AIFES_E_fnn_init_weights,
370  aitensor_t *output_tensor);
371 
372 
373 
374 #endif // EXPRESS_FNN_F32
AIFES_E_init_weights_method
Possible weight initialization methods in AIfES-Express.
Definition: aifes_express_f32_fnn.h:67
@ AIfES_E_init_no_init
No weight init.
Definition: aifes_express_f32_fnn.h:70
@ AIfES_E_init_uniform
Dices the weights in a range of values you specify.
Definition: aifes_express_f32_fnn.h:68
@ AIfES_E_init_glorot_uniform
Random numbers are uniformly diced within a certain range.
Definition: aifes_express_f32_fnn.h:69
AIFES_E_early_stopping
Turn early stopping on or off.
Definition: aifes_express_f32_fnn.h:77
int8_t AIFES_E_inference_fnn_f32(aitensor_t *input_tensor, AIFES_E_model_parameter_fnn_f32 *AIFES_E_fnn, aitensor_t *output_tensor)
Executes the inference.
int8_t AIFES_E_training_fnn_f32(aitensor_t *input_tensor, aitensor_t *target_tensor, AIFES_E_model_parameter_fnn_f32 *AIFES_E_fnn, AIFES_E_training_parameter_fnn_f32 *AIFES_E_fnn_training, AIFES_E_init_weights_parameter_fnn_f32 *AIFES_E_fnn_init_weights, aitensor_t *output_tensor)
Executes the training.
AIFES_E_activations
Possible activation functions in AIfES-Express.
Definition: aifes_express_f32_fnn.h:34
@ AIfES_E_softmax
Softmax.
Definition: aifes_express_f32_fnn.h:37
@ AIfES_E_leaky_relu
Leaky_relu.
Definition: aifes_express_f32_fnn.h:38
@ AIfES_E_sigmoid
Sigmoid.
Definition: aifes_express_f32_fnn.h:36
@ AIfES_E_tanh
Tanh.
Definition: aifes_express_f32_fnn.h:40
@ AIfES_E_relu
Relu.
Definition: aifes_express_f32_fnn.h:35
@ AIfES_E_elu
Elu.
Definition: aifes_express_f32_fnn.h:39
@ AIfES_E_softsign
Softsign.
Definition: aifes_express_f32_fnn.h:41
@ AIfES_E_linear
Linear.
Definition: aifes_express_f32_fnn.h:42
uint32_t AIFES_E_flat_weights_number_fnn_f32(uint32_t *fnn_structure, uint32_t layer_count)
Calculates the total required float weights for the selected network structure.
AIFES_E_loss
Possible loss functions in AIfES-Express.
Definition: aifes_express_f32_fnn.h:49
@ AIfES_E_crossentropy
Crossentropy.
Definition: aifes_express_f32_fnn.h:51
@ AIfES_E_mse
Mean squared error (MSE)
Definition: aifes_express_f32_fnn.h:50
AIFES_E_optimizer
Possible optimizers in AIfES-Express.
Definition: aifes_express_f32_fnn.h:58
@ AIfES_E_adam
ADAM.
Definition: aifes_express_f32_fnn.h:59
@ AIfES_E_sgd
SGD.
Definition: aifes_express_f32_fnn.h:60
AIfES 2 math interface.
Parameters for weight initialization.
Definition: aifes_express_f32_fnn.h:184
float max_init_uniform
max value only for(AIfES_E_init_uniform)
Definition: aifes_express_f32_fnn.h:187
AIFES_E_init_weights_method init_weights_method
Weight initialization method (AIFES_E_init_weights_method)
Definition: aifes_express_f32_fnn.h:185
float min_init_uniform
min value only for(AIfES_E_init_uniform)
Definition: aifes_express_f32_fnn.h:186
Parameters for the FNN model.
Definition: aifes_express_f32_fnn.h:107
void * flat_weights
Pointer to the array with the weights.
Definition: aifes_express_f32_fnn.h:111
uint32_t layer_count
Count of all layers, including input and output layers.
Definition: aifes_express_f32_fnn.h:108
uint32_t * fnn_structure
Pointer to the network structure.
Definition: aifes_express_f32_fnn.h:109
AIFES_E_activations * fnn_activations
Pointer to the activation function list (AIFES_E_activations)
Definition: aifes_express_f32_fnn.h:110
Parameters for Training.
Definition: aifes_express_f32_fnn.h:138
float learn_rate
Learning rate for training (For all optimizers)
Definition: aifes_express_f32_fnn.h:141
AIFES_E_early_stopping early_stopping
Switch early stopping on or off.
Definition: aifes_express_f32_fnn.h:162
float sgd_momentum
Optional momentum for SGD (Value 0.0f means Momentum off)
Definition: aifes_express_f32_fnn.h:142
void(* loss_print_function)(float)
Individual print function for the loss.
Definition: aifes_express_f32_fnn.h:161
uint32_t batch_size
Batch size (min: 1 -> max: Entire data set)
Definition: aifes_express_f32_fnn.h:143
float early_stopping_target_loss
If early stopping is switched on, the target loss can be specified here.
Definition: aifes_express_f32_fnn.h:163
AIFES_E_optimizer optimizer
Optimizer selection (AIFES_E_optimizer)
Definition: aifes_express_f32_fnn.h:140
uint32_t epochs_loss_print_interval
Selection of the interval in which the loss is to be calculated and output via the print function.
Definition: aifes_express_f32_fnn.h:145
AIFES_E_loss loss
Loss selection (AIFES_E_loss)
Definition: aifes_express_f32_fnn.h:139
uint32_t epochs
Number of desired epochs (If early stopping is on, can be stopped before)
Definition: aifes_express_f32_fnn.h:144
A tensor in AIfES.
Definition: aifes_math.h:89