| AIfES 2 2.0.0

Data Fields
aicore_optitype Struct Reference

Type indicator of the optimizer to check for the optimizer type. More...

`#include <aifes_core.h>`

## Data Fields
const char * | name
| Name of the optimizer type (for example "ADAM")
void(* | print_specs )(const aiopti_t *self)
| Set a function to print specs of the optimizer. More...

## Detailed Description

Type indicator of the optimizer to check for the optimizer type.

Every optimizer should have a constant global variable of this type which indicates the optimizer type.
Example for the adam optimizer:

const aicore_optitype_t aiopti_adam_type_s = {
#ifdef AIDEBUG_PRINT_MODULE_SPECS
.name = "ADAM",
.print_specs = aiopti_adam_print_specs
#else
.name = 0,
.print_specs = 0
#endif
};
const aicore_optitype_t *aiopti_adam_type = &aiopti_adam_type_s;
aiopti_adam_print_specs
void aiopti_adam_print_specs(const aiopti_t *self)
Print the optimizer specification.
aiopti_adam_type
const aicore_optitype_t * aiopti_adam_type
Adam optimizer type.
aicore_optitype
Type indicator of the optimizer to check for the optimizer type.
Definition: aifes_core.h:160
aicore_optitype::name
const char * name
Name of the optimizer type (for example "ADAM")
Definition: aifes_core.h:161

Checks for the optimizer type can look like this:

aiopti_t *example_optimizer;
if(example_optimizer->optimizer_type == aiopti_adam_type){
...
}
aiopti
AIfES optimizer interface.
Definition: aifes_core.h:438
aiopti::optimizer_type
const aicore_optitype_t * optimizer_type
Type of the optimizer (for example aiopti_sgd_type)
Definition: aifes_core.h:439

## Field Documentation

## ◆ print_specs

void(* print_specs) (const aiopti_t *self)

Set a function to print specs of the optimizer.

This function should only be set in the debug mode when prints are required (to save memory otherwise)

Parameters

  self | The optimizer
  *print | A function for printing (for example printf)

The documentation for this struct was generated from the following file:

- aifes_core.h