AIfES 2 2.0.0
ailoss_mse Struct Reference

General Mean Squared Error (MSE) loss struct. More...

#include <ailoss_mse.h>

Data Fields

ailoss_t base
 Inherited field members from general ailoss struct.
 
const aimath_dtype_tdtype
 Main data type of the loss.
 
Math fuctions

Required data type specific math functions

void(* tensor_sub )(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
 Required math function: Element wise tensor subtraction. More...
 
void(* norm_squared )(const aitensor_t *x, void *result)
 Required math function: Squared sum of tensor elements. More...
 

Detailed Description

Field Documentation

◆ norm_squared

void(* norm_squared) (const aitensor_t *x, void *result)

Required math function: Squared sum of tensor elements.

Requires a math function that calculates the squared sum of all elements of a given tensor:

\[ result = \sum_i x_{i}^2 \]

◆ tensor_sub

void(* tensor_sub) (const aitensor_t *a, const aitensor_t *b, aitensor_t *result)

Required math function: Element wise tensor subtraction.

Requires a math function that subtracts two tensors element wise:

\[ result = a - b \]


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