Go to the source code of this file.
|
struct PCFNN_LAYER * | PCFNN_LAYER_new (double(*f_init)(), double(*f_act)(double), double(*f_act_de)(double)) |
|
void | PCFNN_LAYER_clear (struct PCFNN_LAYER *l) |
| Clear all neurons in the layer l (It will call PCFNN_NEURON_clear) More...
|
|
void | PCFNN_LAYER_free (struct PCFNN_LAYER *l) |
| Free all memory allocation of an PCFNN_LAYER (It will call PCFNN_NEURON_free) 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...
|
|
◆ PCFNN_LAYER_addn()
int 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.
- Parameters
-
[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 |
- Returns
- 0 if done, 1 if wrong arguments or -1 if an allocation failed and the layer is broken
Definition at line 59 of file layer.c.
◆ PCFNN_LAYER_build()
Initialize all internal data of the layer l and build of PCFNN_NEURON it contains.
- Parameters
-
- Returns
- 0 if done, 1 if wrong arguments or -1 if an allocation failed and the layer is broken
Definition at line 130 of file layer.c.
◆ PCFNN_LAYER_clear()
Clear all neurons in the layer l (It will call PCFNN_NEURON_clear)
- Parameters
-
[in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER to clear |
Definition at line 26 of file layer.c.
◆ PCFNN_LAYER_connect()
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(*)(double) |
f_act_to, |
|
|
double(*)(double) |
f_act_de_to |
|
) |
| |
Connect two PCFNN_LAYER. It will create a link between from and to.
- Parameters
-
[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) |
- Returns
- 0 if done, 1 if wrong arguments or -1 if an allocation failed and the layer is broken
Definition at line 89 of file layer.c.
◆ PCFNN_LAYER_free()
Free all memory allocation of an PCFNN_LAYER (It will call PCFNN_NEURON_free)
- Parameters
-
[in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER to free |
Definition at line 34 of file layer.c.
◆ PCFNN_LAYER_get_ram_usage()
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.
- Parameters
-
- Returns
- (size_t) number of bytes if l is NULL return 0
Definition at line 179 of file layer.c.
◆ PCFNN_LAYER_new()
struct PCFNN_LAYER* PCFNN_LAYER_new |
( |
double(*)() |
f_init, |
|
|
double(*)(double) |
f_act, |
|
|
double(*)(double) |
f_act_de |
|
) |
| |
◆ PCFNN_LAYER_new_input()
struct PCFNN_LAYER* PCFNN_LAYER_new_input |
( |
size_t |
size, |
|
|
double(*)(double) |
f_act, |
|
|
double(*)(double) |
f_act_de |
|
) |
| |
Initialize a PCFNN_LAYER as an input layer.
- Parameters
-
[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 |
- Returns
- PCFNN_LAYER structure pointer or NULL if an error occured
Definition at line 78 of file layer.c.
◆ PCFNN_LAYER_set_lock_state()
Set lock state of size neurons of l starting by offset neuron of l.
- Parameters
-
[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.
◆ PCFNN_LAYER_summary()
void PCFNN_LAYER_summary |
( |
struct PCFNN_LAYER * |
l, |
|
|
size_t |
param[2] |
|
) |
| |
Write on param the number of unlocked parameters and locked parameters.
- 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.