282 #ifdef AIDEBUG_PRINT_MODULE_SPECS
void aiopti_adam_update_params(aiopti_t *self, aitensor_t *params, const aitensor_t *gradients, void *optimem)
Update the given parameter tensor with respect to the gradients.
void aiopti_adam_init_optimem(aiopti_t *self, const aitensor_t *params, const aitensor_t *gradients, void *optimem)
Initialization of the optimization memory buffer.
void aiopti_adam_zero_gradients(aiopti_t *self, aitensor_t *gradients)
Set the gradients to zero.
uint32_t aiopti_adam_sizeof_optimem(aiopti_t *self, const aitensor_t *params)
Calculates the required memory for the optimization step.
void aiopti_adam_print_specs(const aiopti_t *self)
Print the optimizer specification.
const aicore_optitype_t * aiopti_adam_type
Adam optimizer type.
aiopti_t * aiopti_adam(aiopti_adam_t *opti)
Initialize the given Adam optimizer.
Type indicator of the optimizer to check for the optimizer type.
Definition: aifes_core.h:160
Struct for the momentum tensors of an Adam optimizer.
Definition: aiopti_adam.h:174
aitensor_t v
Second momentum vector.
Definition: aiopti_adam.h:176
aitensor_t m
First momentum vector.
Definition: aiopti_adam.h:175
General Adam optimizer struct.
Definition: aiopti_adam.h:56
void(* scalar_mul)(const void *scalar, const aitensor_t *a, aitensor_t *result)
Required math function: Multiplication of a scalar with a tensor.
Definition: aiopti_adam.h:130
void * one_minus_beta1
aiscalar: Auxiliary variable to calculate
Definition: aiopti_adam.h:77
void(* multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor multiplication.
Definition: aiopti_adam.h:94
void(* scalar_add)(const void *scalar, const aitensor_t *a, aitensor_t *result)
Required math function: Element wise addition of a scalar to a tensor.
Definition: aiopti_adam.h:139
void(* divide)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor dividation.
Definition: aiopti_adam.h:103
void(* sqrt)(const aitensor_t *x, aitensor_t *result)
Required math function: Square root.
Definition: aiopti_adam.h:148
void(* tensor_sub)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor subtraction.
Definition: aiopti_adam.h:121
void * eps
aiscalar: Small positive number for numerical stability (avoid dividing by 0)
Definition: aiopti_adam.h:67
void * one_minus_beta2
aiscalar: Auxiliary variable to calculate
Definition: aiopti_adam.h:78
void(* tensor_add)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor addition.
Definition: aiopti_adam.h:112
aiopti_t base
Inherited field members from general optimizer struct.
Definition: aiopti_adam.h:57
void * beta1t
aiscalar: Auxiliary variable to calculate
Definition: aiopti_adam.h:75
void * beta2t
aiscalar: Auxiliary variable to calculate
Definition: aiopti_adam.h:76
void * lrt
aiscalar: Auxiliary variable to calculate
Definition: aiopti_adam.h:79
void * beta2
aiscalar: Exponential decay rate for the second moment estimates
Definition: aiopti_adam.h:66
void(* zero_tensor)(aitensor_t *tensor)
Required math function: Sets the elements of a tensor to zero.
Definition: aiopti_adam.h:157
void * beta1
aiscalar: Exponential decay rate for the first moment estimates
Definition: aiopti_adam.h:65
AIfES optimizer interface.
Definition: aifes_core.h:438
A tensor in AIfES.
Definition: aifes_math.h:89