AIfES 2  2.0.0
ailoss Struct Reference

AIfES loss interface. More...

#include <aifes_core.h>

Data Fields

const aicore_losstype_tloss_type
 Type of the loss (for example ailoss_mse_type)
 
void * loss_configuration
 Loss specific configurations (back-link from abstract loss class to implementation)
 
ailayer_t connection_layer
 Dummy layer for docking to the layer structure.
 
void(* calc_loss )(ailoss_t *self, const aitensor_t *target_data, void *result)
 Calculate the loss / cost for the model on the given targets. More...
 
void(* calc_delta )(ailoss_t *self, const aitensor_t *target_data)
 Calculate the error on the target data and write it to the deltas tensor of connection layer. More...
 

Detailed Description

AIfES loss interface.

The interface contains the necessary functions and parameters for loss and error calculation on the target data. (Refer to aifes_core.h for a structural overview)

Field Documentation

◆ calc_delta

void(* calc_delta) (ailoss_t *self, const aitensor_t *target_data)

Calculate the error on the target data and write it to the deltas tensor of connection layer.

Parameters
selfThe layer
target_dataTensor containing the target data / labels

◆ calc_loss

void(* calc_loss) (ailoss_t *self, const aitensor_t *target_data, void *result)

Calculate the loss / cost for the model on the given targets.

Parameters
selfThe layer
target_dataTensor containing the target data / labels
resultScalar in which the output can be written (aiscalar of same type as layer type).

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