| AIfES 2 2.0.0

Data Fields
aicore_layertype Struct Reference

Type indicator of the layer. More...

`#include <aifes_core.h>`

## Data Fields
const char * | name
| Name of the layer type (for example "Dense")
void(* | print_specs )(const ailayer_t *self)
| Set a function to print specs of the layer (for example size, constants) More...

## Detailed Description

Type indicator of the layer.

Every layer should have a constant global variable of this type which indicates the layer type.

Example for the dense layer:

const aicore_layertype_t ailayer_dense_type_s = {
#ifdef AIDEBUG_PRINT_MODULE_SPECS
.name = "Dense",
.print_specs = ailayer_dense_print_specs
#else
.name = 0,
.print_specs = 0
#endif
};
const aicore_layertype_t *ailayer_dense_type = &ailayer_dense_type_s;
ailayer_dense_type
const aicore_layertype_t * ailayer_dense_type
Dense layer type.
ailayer_dense_print_specs
void ailayer_dense_print_specs(const ailayer_t *self)
Print the layer specification.
aicore_layertype
Type indicator of the layer.
Definition: aifes_core.h:82
aicore_layertype::name
const char * name
Name of the layer type (for example "Dense")
Definition: aifes_core.h:83

Checks for the layer type can look like this:

ailayer_t *example_layer;
if(example_layer->layer_type == ailayer_dense_type){
...
}
ailayer
AIfES layer interface.
Definition: aifes_core.h:252
ailayer::layer_type
const aicore_layertype_t * layer_type
Type of the layer (for example ailayer_dense_type)
Definition: aifes_core.h:253

## Field Documentation

## ◆ print_specs

void(* print_specs) (const ailayer_t *self)

Set a function to print specs of the layer (for example size, constants)

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

Parameters

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

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

- aifes_core.h