![]() |
AIfES 2 2.0.0
|
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... | |
struct | aiopti_sgd_q31 |
Data-type specific SGD optimizer struct for Q31 . More... | |
Typedefs | |
typedef struct aiopti_sgd_f32 | aiopti_sgd_f32_t |
New data type name for code reduction. | |
typedef struct aiopti_sgd_q31 | aiopti_sgd_q31_t |
New data type name for code reduction. | |
typedef struct aiopti_sgd_q7 | aiopti_sgd_q7_t |
New data type name for code reduction. | |
Functions | |
aiopti_t * | aiopti_sgd_f32_default (aiopti_sgd_f32_t *opti) |
Initializes a SGD optimizer with the F32 default implementation. More... | |
aiopti_t * | aiopti_sgd_q31_default (aiopti_sgd_q31_t *opti) |
Initializes a SGD optimizer with the Q31 default implementation. More... | |
Default implementation of the Stochastic Gradient Descend optimizer .
AIfES is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero 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 , Q31 data-type. For more information about the Stochastic Gradient Descend optimizer refer to aiopti_sgd.h.
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 (with disabled momentum):
In C:
In C, C++ and on Arduino:
Example: Create the optimizer structure (with enabled momentum):
In C:
In C, C++ and on Arduino:
Example: Initialize the optimizer:
*opti | The optimizer structure to initialize. |
aiopti_t * aiopti_sgd_q31_default | ( | aiopti_sgd_q31_t * | opti | ) |
Initializes a SGD optimizer with the Q31 default implementation.
You can set the momentum to zero to save memory space.
Example: Create the optimizer structure (with disabled momentum):
In C:
In C, C++ and on Arduino:
Example: Create the optimizer structure (with enabled momentum):
In C:
In C, C++ and on Arduino:
Example: Initialize the optimizer:
*opti | The optimizer structure to initialize. |