| AIfES 2 2.0.0

aiopti_adam_default.h
Go to the documentation of this file.
1
27 #ifndef AIOPTI_ADAM_DEFAULT
28 #define AIOPTI_ADAM_DEFAULT
29
30 #include "basic/base/aiopti/aiopti_adam.h"
31
32 #include "basic/default/aimath/aimath_f32_default.h"
33 #include "basic/default/aimath/aimath_q7_default.h"
34
35 #define AIOPTI_ADAM_F32(learning_rate, beta1, beta2, eps) {{{0,},},learning_rate, beta1, beta2, eps}
36 #define AIOPTI_ADAM_Q31(learning_rate, beta1, beta2, eps) {{{0,},},learning_rate, beta1, beta2, eps}
37
38 typedef struct aiopti_adam_f32 aiopti_adam_f32_t;
39 //typedef struct aiopti_adam_q31 aiopti_adam_q31_t;
40
45 struct aiopti_adam_f32 {
46 aiopti_adam_t base;
54 aiscalar_f32_t learning_rate;
56 aiscalar_f32_t beta1;
57 aiscalar_f32_t beta2;
58 aiscalar_f32_t eps;
60
66 aiscalar_f32_t beta1t;
67 aiscalar_f32_t beta2t;
68 aiscalar_f32_t one_minus_beta1;
69 aiscalar_f32_t one_minus_beta2;
70 aiscalar_f32_t lrt;
72 };
73
74
103 aiopti_t *aiopti_adam_f32_default(aiopti_adam_f32_t *opti);
104
121 void aiopti_adam_f32_default_begin_step(aiopti_t *self);
122
143 void aiopti_adam_f32_default_end_step(aiopti_t *self);
144
145 #endif // AIOPTI_ADAM_DEFAULT
aiscalar_f32_t
float aiscalar_f32_t
Scalar for F32 (aif32) data-type.
Definition: aimath_f32.h:120
aimath_f32_default.h
Math functions for F32 data type, default implementation.
aimath_q7_default.h
Math functions for Q7 data type, default implementation.
aiopti_adam.h
Base optimizer implementation of the Adam optimizer
aiopti_adam_f32_default_begin_step
void aiopti_adam_f32_default_begin_step(aiopti_t *self)
F32 default implementation of the aiopti.begin_step function for ADAM
aiopti_adam_f32_default_end_step
void aiopti_adam_f32_default_end_step(aiopti_t *self)
F32 default implementation of the aiopti.end_step function for ADAM
aiopti_adam_f32_default
aiopti_t * aiopti_adam_f32_default(aiopti_adam_f32_t *opti)
Initializes an Adam optimizer with the F32 default implementation.
aiopti_adam_f32
Data-type specific Adam optimizer struct for F32 .
Definition: aiopti_adam_default.h:45
aiopti_adam_f32::one_minus_beta1
aiscalar_f32_t one_minus_beta1
Storage for aiopti_adam.one_minus_beta1 scalar in F32.
Definition: aiopti_adam_default.h:68
aiopti_adam_f32::lrt
aiscalar_f32_t lrt
Storage for aiopti_adam.lrt scalar in F32.
Definition: aiopti_adam_default.h:70
aiopti_adam_f32::beta1
aiscalar_f32_t beta1
Storage for aiopti_adam.beta1 scalar in F32.
Definition: aiopti_adam_default.h:56
aiopti_adam_f32::base
aiopti_adam_t base
Inherited field members from general optimizer struct.
Definition: aiopti_adam_default.h:46
aiopti_adam_f32::one_minus_beta2
aiscalar_f32_t one_minus_beta2
Storage for aiopti_adam.one_minus_beta2 scalar in F32.
Definition: aiopti_adam_default.h:69
aiopti_adam_f32::beta2
aiscalar_f32_t beta2
Storage for aiopti_adam.beta2 scalar in F32.
Definition: aiopti_adam_default.h:57
aiopti_adam_f32::learning_rate
aiscalar_f32_t learning_rate
Storage for aiopti.learning_rate scalar in F32.
Definition: aiopti_adam_default.h:54
aiopti_adam_f32::beta2t
aiscalar_f32_t beta2t
Storage for aiopti_adam.beta2t scalar in F32.
Definition: aiopti_adam_default.h:67
aiopti_adam_f32::beta1t
aiscalar_f32_t beta1t
Storage for aiopti_adam.beta1t scalar in F32.
Definition: aiopti_adam_default.h:66
aiopti_adam_f32::eps
aiscalar_f32_t eps
Storage for aiopti_adam.eps scalar in F32.
Definition: aiopti_adam_default.h:58
aiopti_adam
General Adam optimizer struct.
Definition: aiopti_adam.h:56
aiopti
AIfES optimizer interface.
Definition: aifes_core.h:438