![]() |
ANN
0.1.1.5
A library containing multiple neural network models written in C
|
Include dependency graph for layer.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | PCFNN_LAYER_LINK |
| Structure to represent a link between to PCFNN_LAYER. More... | |
| struct | PCFNN_LAYER |
| Layer unit. More... | |
Typedefs | |
| typedef struct PCFNN_LAYER | PCFNN_LAYER |
Enumerations | |
| enum | PCFNN_LAYER_TYPE { PCFNN_LAYER_INPUT, PCFNN_LAYER_HIDDEN, PCFNN_LAYER_OUTPUT } |
| Type list of a layer. More... | |
Functions | |
| struct PCFNN_LAYER * | PCFNN_LAYER_new (double(*f_init)(), double(*f_act)(double), double(*f_act_de)(double)) |
| void | PCFNN_LAYER_free (struct PCFNN_LAYER *l) |
| Free all memory allocation of an PCFNN_LAYER (It will call PCFNN_NEURON_free) More... | |
| void | PCFNN_LAYER_clear (struct PCFNN_LAYER *l) |
| Clear all neurons in the layer l (It will call PCFNN_NEURON_clear) More... | |
| int | PCFNN_LAYER_addn (struct PCFNN_LAYER *l, size_t size, size_t inputs, double(*f_init)(), double(*f_act)(double), double(*f_act_de)(double)) |
| Add neurons in the PCFNN_LAYER l. More... | |
| struct PCFNN_LAYER * | PCFNN_LAYER_new_input (size_t size, double(*f_act)(double), double(*f_act_de)(double)) |
| Initialize a PCFNN_LAYER as an input layer. More... | |
| int | PCFNN_LAYER_connect (struct PCFNN_LAYER *from, struct PCFNN_LAYER *to, size_t size_from, size_t size_to, size_t offset_from, size_t offset_to, double(*f_init_to)(), double(*f_act_to)(double), double(*f_act_de_to)(double)) |
| Connect two PCFNN_LAYER. It will create a link between from and to. More... | |
| int | PCFNN_LAYER_build (struct PCFNN_LAYER *l) |
| Initialize all internal data of the layer l and build of PCFNN_NEURON it contains. More... | |
| size_t | PCFNN_LAYER_get_ram_usage (struct PCFNN_LAYER *l) |
| Give the number of bytes used by the PCFNN_LAYER l and all PCFNN_NEURON it contains. More... | |
| void | PCFNN_LAYER_set_lock_state (struct PCFNN_LAYER *l, enum PCFNN_NEURON_LOCK_STATE state, size_t size, size_t offset) |
| Set lock state of size neurons of l starting by offset neuron of l. More... | |
| void | PCFNN_LAYER_summary (struct PCFNN_LAYER *l, size_t param[2]) |
| Write on param the number of unlocked parameters and locked parameters. More... | |
| typedef struct PCFNN_LAYER PCFNN_LAYER |
| enum PCFNN_LAYER_TYPE |
| PCFNN_LAYER_addn | ( | struct PCFNN_LAYER * | l, |
| size_t | size, | ||
| size_t | inputs, | ||
| double(*)() | f_init, | ||
| double(*)(double) | f_act, | ||
| double(*)(double) | f_act_de | ||
| ) |
Add neurons in the PCFNN_LAYER l.
| [in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER |
| [in] | size | (size_t) number of PCFNN_NEURON to Add |
| [in] | inputs | (size_t) number of input for each new PCFNN_NEURON |
| [in] | f_init | (double(*f_init)()) a pointer on an weights/bias initialisation functon or NULL |
| [in] | f_act | (double(*f_act)(double)) a pointer on activation functon or NULL |
| [in] | f_act_de | (double(*f_act_de)(double)) a pointer on derivative activation functon who is the derivate of the f_act function pointer or NULL |
Definition at line 59 of file layer.c.
Here is the call graph for this function:| PCFNN_LAYER_build | ( | struct PCFNN_LAYER * | l | ) |
Initialize all internal data of the layer l and build of PCFNN_NEURON it contains.
| [in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER |
Definition at line 130 of file layer.c.
Here is the call graph for this function:| PCFNN_LAYER_clear | ( | struct PCFNN_LAYER * | l | ) |
Clear all neurons in the layer l (It will call PCFNN_NEURON_clear)
| [in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER to clear |
Definition at line 26 of file layer.c.
Here is the call graph for this function:| PCFNN_LAYER_connect | ( | struct PCFNN_LAYER * | from, |
| struct PCFNN_LAYER * | to, | ||
| size_t | size_from, | ||
| size_t | size_to, | ||
| size_t | offset_from, | ||
| size_t | offset_to, | ||
| double(*)() | f_init_to, | ||
| double(*)(double) | f_act_to, | ||
| double(*)(double) | f_act_de_to | ||
| ) |
Connect two PCFNN_LAYER. It will create a link between from and to.
| [in] | from | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER |
| [in] | to | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER |
| [in] | size_from | (size_t) number of neuron of from to connect |
| [in] | size_to | (size_t) number of neuron of to to connect (It will create size_to neurons in to if necessary) |
| [in] | offset_from | (size_t) offset of offset_from where you want to start the connection for the from layer |
| [in] | offset_to | (size_t) offset of offset_to where you want to start the connection for the to layer |
| [in] | f_init_to | (double(*f_init_to)()) a pointer on an weights/bias initialisation functon or NULL (Will be use if need to create new neurons in the to layer) |
| [in] | f_act_to | (double(*f_act_to)(double)) a pointer on activation functon or NULL (Will be use if need to create new neurons in the to layer) |
| [in] | f_act_de_to | (double(*f_act_de_to)(double)) a pointer on derivative activation functon who is the derivate of the f_act function pointer or NULL (Will be use if need to create new neurons in the to layer) |
| PCFNN_LAYER_free | ( | struct PCFNN_LAYER * | l | ) |
Free all memory allocation of an PCFNN_LAYER (It will call PCFNN_NEURON_free)
| [in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER to free |
Definition at line 34 of file layer.c.
Here is the call graph for this function:| PCFNN_LAYER_get_ram_usage | ( | struct PCFNN_LAYER * | l | ) |
Give the number of bytes used by the PCFNN_LAYER l and all PCFNN_NEURON it contains.
| [in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER |
Definition at line 179 of file layer.c.
Here is the call graph for this function:| struct PCFNN_LAYER* PCFNN_LAYER_new | ( | double(*)() | f_init, |
| double(*)(double) | f_act, | ||
| double(*)(double) | f_act_de | ||
| ) |
| PCFNN_LAYER_new_input | ( | size_t | size, |
| double(*)(double) | f_act, | ||
| double(*)(double) | f_act_de | ||
| ) |
Initialize a PCFNN_LAYER as an input layer.
| [in] | size | (size_t) number of neuron in this layer |
| [in] | f_act | (double(*f_act)(double)) a pointer on activation functon or NULL |
| [in] | f_act_de | (double(*f_act_de)(double)) a pointer on derivative activation functon who is the derivate of the f_act function pointer or NULL |
Definition at line 78 of file layer.c.
Here is the call graph for this function:| PCFNN_LAYER_set_lock_state | ( | struct PCFNN_LAYER * | l, |
| enum PCFNN_NEURON_LOCK_STATE | state, | ||
| size_t | size, | ||
| size_t | offset | ||
| ) |
Set lock state of size neurons of l starting by offset neuron of l.
| [in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER |
| [in] | state | (enum PCFNN_NEURON_LOCK_STATE) lock state |
| [in] | size | (size_t) number of neurons to set lock state |
| [in] | offset | (size_t) neurons offset |
Definition at line 191 of file layer.c.
Here is the call graph for this function:| PCFNN_LAYER_summary | ( | struct PCFNN_LAYER * | l, |
| size_t | param[2] | ||
| ) |
Write on param the number of unlocked parameters and locked parameters.
| [in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER |
| [out] | param | (size_t) param[0] will be the number of unlocked parameters and param[1] the number of locked parameters |
Definition at line 199 of file layer.c.
Here is the call graph for this function: