AIfES 2  2.0.0
aiopti_sgd_default.h File Reference

Default implementation of the Stochastic Gradient Descend optimizer . More...

Go to the source code of this file.

Data Structures

struct  aiopti_sgd_f32
 Data-type specific SGD optimizer struct for F32 . More...
 

Typedefs

typedef struct aiopti_sgd_f32 aiopti_sgd_f32_t
 New data type name for code reduction.
 

Functions

aiopti_taiopti_sgd_f32_default (aiopti_sgd_f32_t *opti)
 Initializes a SGD optimizer with the F32 default implementation. More...
 

Detailed Description

Default implementation of the Stochastic Gradient Descend optimizer .

Version
2.0alpha

AIfES is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Hardware independent implementations of the Stochastic Gradient Descend optimizer in F32 data-type. For more information about the Stochastic Gradient Descend optimizer refer to aiopti_sgd.h.

Function Documentation

◆ aiopti_sgd_f32_default()

aiopti_t* aiopti_sgd_f32_default ( aiopti_sgd_f32_t opti)

Initializes a SGD optimizer with the F32 default implementation.

You can set the momentum to zero to save memory space.

Example: Create the optimizer structure:

aiopti_sgd_f32_t sgd_optimizer = {
.learning_rate = 0.01f,
.momentum = 0.9f
};
Data-type specific SGD optimizer struct for F32 .
Definition: aiopti_sgd_default.h:42
aiscalar_f32_t learning_rate
Storage for aiopti.learning_rate scalar in F32.
Definition: aiopti_sgd_default.h:45

Example: Initialize the optimizer:

aiopti_t *optimizer;
optimizer = aiopti_sgd_f32_default(&sgd_optimizer);
aiopti_t * aiopti_sgd_f32_default(aiopti_sgd_f32_t *opti)
Initializes a SGD optimizer with the F32 default implementation.
AIfES optimizer interface.
Definition: aifes_core.h:413
Parameters
*optiThe optimizer structure to initialize.
Returns
The (successfully) initialized optimizer structure.