| AIfES 2 2.0.0

Data Fields
AIFES_E_training_parameter_fnn_f32 Struct Reference

Parameters for Training. More...

`#include <aifes_express_f32_fnn.h>`

## Data Fields
AIFES_E_loss | loss
| Loss selection (AIFES_E_loss)
AIFES_E_optimizer | optimizer
| Optimizer selection (AIFES_E_optimizer)
float | learn_rate
| Learning rate for training (For all optimizers)
float | sgd_momentum
| Optional momentum for SGD (Value 0.0f means Momentum off)
uint32_t | batch_size
| Batch size (min: 1 -> max: Entire data set)
uint32_t | epochs
| Number of desired epochs (If early stopping is on, can be stopped before)
uint32_t | epochs_loss_print_interval
| Selection of the interval in which the loss is to be calculated and output via the print function.
void(* | loss_print_function )(float)
| Individual print function for the loss. More...
AIFES_E_early_stopping | early_stopping
| Switch early stopping on or off.
float | early_stopping_target_loss
| If early stopping is switched on, the target loss can be specified here. More...

## Detailed Description

Parameters for Training.

The structure includes all parameters for training.

Example:

AIFES_E_training_parameter_fnn_f32 nn_train_config;
nn_train_config.optimizer = AIfES_E_adam;
nn_train_config.sgd_momentum = 0.0f; // Only for SGD optimizer
nn_train_config.loss = AIfES_E_mse;
nn_train_config.learn_rate = 0.05f;
nn_train_config.batch_size = 4;
nn_train_config.epochs = 100;
nn_train_config.epochs_loss_print_interval = 10;
// Your individual print function
nn_train_config.loss_print_function = my_print_function;
//You can enable early stopping, so that learning is automatically stopped when a learning target is reached
nn_train_config.early_stopping = AIfES_E_early_stopping_on;
//Define your target loss
nn_train_config.early_stopping_target_loss = 0.004;
AIfES_E_mse
@ AIfES_E_mse
Mean squared error (MSE)
Definition: aifes_express_f32_fnn.h:50
AIfES_E_adam
@ AIfES_E_adam
ADAM.
Definition: aifes_express_f32_fnn.h:59
AIFES_E_training_parameter_fnn_f32
Parameters for Training.
Definition: aifes_express_f32_fnn.h:138
AIFES_E_training_parameter_fnn_f32::learn_rate
float learn_rate
Learning rate for training (For all optimizers)
Definition: aifes_express_f32_fnn.h:141
AIFES_E_training_parameter_fnn_f32::early_stopping
AIFES_E_early_stopping early_stopping
Switch early stopping on or off.
Definition: aifes_express_f32_fnn.h:162
AIFES_E_training_parameter_fnn_f32::sgd_momentum
float sgd_momentum
Optional momentum for SGD (Value 0.0f means Momentum off)
Definition: aifes_express_f32_fnn.h:142
AIFES_E_training_parameter_fnn_f32::loss_print_function
void(* loss_print_function)(float)
Individual print function for the loss.
Definition: aifes_express_f32_fnn.h:161
AIFES_E_training_parameter_fnn_f32::batch_size
uint32_t batch_size
Batch size (min: 1 -> max: Entire data set)
Definition: aifes_express_f32_fnn.h:143
AIFES_E_training_parameter_fnn_f32::early_stopping_target_loss
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_training_parameter_fnn_f32::optimizer
AIFES_E_optimizer optimizer
Optimizer selection (AIFES_E_optimizer)
Definition: aifes_express_f32_fnn.h:140
AIFES_E_training_parameter_fnn_f32::epochs_loss_print_interval
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_training_parameter_fnn_f32::loss
AIFES_E_loss loss
Loss selection (AIFES_E_loss)
Definition: aifes_express_f32_fnn.h:139
AIFES_E_training_parameter_fnn_f32::epochs
uint32_t epochs
Number of desired epochs (If early stopping is on, can be stopped before)
Definition: aifes_express_f32_fnn.h:144

## Field Documentation

## ◆ early_stopping_target_loss

float early_stopping_target_loss

If early stopping is switched on, the target loss can be specified here.

It is only checked in the print interval

## ◆ loss_print_function

void(* loss_print_function) (float)

Individual print function for the loss.

The loss is calculated only in the previously selected interval and output via the function to which the pointer points The function must have the following structure

void my_print_function(float loss)
{
//E.g. a normal print output
printf("Loss: %f\n", loss);
}

Parameters

  tensor | The tensor to print

The documentation for this struct was generated from the following file:

- aifes_express_f32_fnn.h