AIfES 2  2.0.0
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",
#else
.name = 0,
.print_specs = 0
#endif
};
const aicore_layertype_t *ailayer_dense_type = &ailayer_dense_type_s;
const aicore_layertype_t * ailayer_dense_type
Dense layer type.
void ailayer_dense_print_specs(const ailayer_t *self)
Print the layer specification.
Type indicator of the layer.
Definition: aifes_core.h:82
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){
...
}
AIfES layer interface.
Definition: aifes_core.h:252
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
selfThe layer
*printA function for printing (for example printf)

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