AIfES 2
2.0.0
|
AIfES loss interface. More...
#include <aifes_core.h>
Data Fields | |
const aicore_losstype_t * | loss_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... | |
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)
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.
self | The layer |
target_data | Tensor containing the target data / labels |
void(* calc_loss) (ailoss_t *self, const aitensor_t *target_data, void *result) |
Calculate the loss / cost for the model on the given targets.
self | The layer |
target_data | Tensor containing the target data / labels |
result | Scalar in which the output can be written (aiscalar of same type as layer type). |