27 #ifndef AIOPTI_SGD_DEFAULT
28 #define AIOPTI_SGD_DEFAULT
36 #define AIOPTI_SGD_F32(learning_rate) {{{0,},},learning_rate, 0.0f}
37 #define AIOPTI_SGD_WITH_MOMENTUM_F32(learning_rate, momentum) {{{0,},},learning_rate, momentum}
38 #define AIOPTI_SGD_Q31(learning_rate) {{{0,},},learning_rate, {0,0,0}}
39 #define AIOPTI_SGD_WITH_MOMENTUM_Q31(learning_rate, momentum) {{{0,},},learning_rate, momentum}
float aiscalar_f32_t
Scalar for F32 (aif32) data-type.
Definition: aimath_f32.h:120
Math functions for F32 data type, default implementation.
Math functions for Q31 data type, default implementation.
Math functions for Q7 data type, default implementation.
Base optimizer implementation of the Stochastic Gradient Descent (with momentum) optimizer.
aiopti_t * aiopti_sgd_f32_default(aiopti_sgd_f32_t *opti)
Initializes a SGD optimizer with the F32 default implementation.
aiopti_t * aiopti_sgd_q31_default(aiopti_sgd_q31_t *opti)
Initializes a SGD optimizer with the Q31 default implementation.
struct aiopti_sgd_q7 aiopti_sgd_q7_t
New data type name for code reduction.
Definition: aiopti_sgd_default.h:43
Data-type specific SGD optimizer struct for F32 .
Definition: aiopti_sgd_default.h:49
aiopti_sgd_t base
Inherited field members from general aiopti_sgd struct.
Definition: aiopti_sgd_default.h:50
aiscalar_f32_t learning_rate
Storage for aiopti.learning_rate scalar in F32.
Definition: aiopti_sgd_default.h:52
aiscalar_f32_t momentum
Storage for aiopti_sgd.momentum scalar in F32.
Definition: aiopti_sgd_default.h:54
Data-type specific SGD optimizer struct for Q31 .
Definition: aiopti_sgd_default.h:61
aiopti_sgd_t base
Inherited field members from general optimizer struct.
Definition: aiopti_sgd_default.h:62
aiscalar_q31_t momentum
Data-type specific momentum.
Definition: aiopti_sgd_default.h:66
aiscalar_q31_t learning_rate
Data-type specific learning rate.
Definition: aiopti_sgd_default.h:64
General Stochastic Gradient Descent (SGD) optimizer struct.
Definition: aiopti_sgd.h:56
AIfES optimizer interface.
Definition: aifes_core.h:438
Single quantized Q31 value/scalar.
Definition: aimath_q31.h:156