AIfES 2  2.0.0
aiopti_sgd Struct Reference

General Stochastic Gradient Descent (SGD) optimizer struct. More...

#include <aiopti_sgd.h>

Data Fields

aiopti_t base
 Inherited field members from general optimizer struct.
 
Optimizer configuration

Required configuration parameters for the optimizer

These fields have to be configured by the user before calling the initializer function.

void * momentum
 aiscalar: Momentum(set to null to save optimization memory)
 
Math functions

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(* tensor_add )(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
 Required math function: Element wise tensor addition. More...
 
void(* scalar_mul )(const void *scalar, const aitensor_t *a, aitensor_t *result)
 Required math function: Multiplication of a scalar with a tensor. More...
 
void(* zero_tensor )(aitensor_t *tensor)
 Required math function: Sets the elements of a tensor to zero. More...
 

Detailed Description

Field Documentation

◆ scalar_mul

void(* scalar_mul) (const void *scalar, const aitensor_t *a, aitensor_t *result)

Required math function: Multiplication of a scalar with a tensor.

Requires a math function that multiplies a scalar with a tensor:

\[ result = scalar \cdot a \]

◆ tensor_add

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

Required math function: Element wise tensor addition.

Requires a math function that adds two tensors element wise:

\[ result = a + b \]

◆ 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 \]

◆ zero_tensor

void(* zero_tensor) (aitensor_t *tensor)

Required math function: Sets the elements of a tensor to zero.

Requires a math function that sets the elements of the given tensor to zero (or to the zero_point):

\[ tensor_i = 0 \]


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