ANN
0.1.1.5
A library containing multiple neural network models written in C
|
#include "../../config.h"
#include <stdlib.h>
#include <stdio.h>
#include "layer.h"
#include "ANN/tools.h"
Go to the source code of this file.
Data Structures | |
struct | PCFNN_NETWORK |
Network unit. More... | |
Typedefs | |
typedef struct PCFNN_NETWORK | PCFNN_NETWORK |
Functions | |
struct PCFNN_NETWORK * | PCFNN_NETWORK_new () |
Initialize a PCFNN_NETWORK. More... | |
void | PCFNN_NETWORK_free (struct PCFNN_NETWORK *net) |
Free all memory allocation of an PCFNN_NETWORK (It will call PCFNN_LAYER_free) More... | |
void | PCFNN_NETWORK_clear (struct PCFNN_NETWORK *net) |
Clear all layers in the PCFNN_NETWORK net (It will call PCFNN_LAYER_clear) More... | |
int | PCFNN_NETWORK_addl (struct PCFNN_NETWORK *net, struct PCFNN_LAYER *l) |
Add the PCFNN_LAYER l to the PCFNN_NETWORK net. More... | |
int | PCFNN_NETWORK_build (struct PCFNN_NETWORK *net) |
Initialize all internal data of the PCFNN_NETWORK l and build of PCFNN_LAYER it contains. More... | |
struct PCFNN_NETWORK * | PCFNN_NETWORK_build_from_array (size_t *spec, size_t len, double(*f_init)(double), double(*f_act)(double), double(*f_act_de)(double)) |
Initialize a new PCFNN_NETWORK from an array of number that represent the number of neurons for each layers. More... | |
size_t | PCFNN_NETWORK_get_ram_usage (struct PCFNN_NETWORK *net) |
Give the number of bytes used by the PCFNN_NETWORK net and all PCFNN_LAYER it contains. More... | |
void | PCFNN_NETWORK_summary (struct PCFNN_NETWORK *net, size_t param[5]) |
Write on param network statistics. More... | |
void | PCFNN_NETWORK_print_summary (struct PCFNN_NETWORK *net) |
Print neural network summary. More... | |
typedef struct PCFNN_NETWORK PCFNN_NETWORK |
PCFNN_NETWORK_addl | ( | struct PCFNN_NETWORK * | net, |
struct PCFNN_LAYER * | l | ||
) |
Add the PCFNN_LAYER l to the PCFNN_NETWORK net.
[in] | net | (struct PCFNN_NETWORK*) a pointer an a PCFNN_NETWORK |
[in] | l | (struct PCFNN_LAYER*) a pointer an a PCFNN_LAYER to add |
PCFNN_NETWORK_build | ( | struct PCFNN_NETWORK * | net | ) |
Initialize all internal data of the PCFNN_NETWORK l and build of PCFNN_LAYER it contains.
[in] | net | (struct PCFNN_NETWORK*) a pointer an a PCFNN_NETWORK |
Definition at line 50 of file network.c.
PCFNN_NETWORK * PCFNN_NETWORK_build_from_array | ( | size_t * | spec, |
size_t | len, | ||
double(*)(double) | f_init, | ||
double(*)(double) | f_act, | ||
double(*)(double) | f_act_de | ||
) |
Initialize a new PCFNN_NETWORK from an array of number that represent the number of neurons for each layers.
[in] | spec | (size_t*) array of number that represent the number of neurons for each layers |
[in] | len | (size_t) length of spec |
[in] | f_init | (double(*f_init)()) a pointer on an weights/bias initialisation functon |
[in] | f_act | (double(*f_act)(double)) a pointer on activation functon |
[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 |
Definition at line 70 of file network.c.
PCFNN_NETWORK_clear | ( | struct PCFNN_NETWORK * | net | ) |
Clear all layers in the PCFNN_NETWORK net (It will call PCFNN_LAYER_clear)
[in] | net | (struct PCFNN_NETWORK*) a pointer an a PCFNN_NETWORK to clear |
Definition at line 31 of file network.c.
PCFNN_NETWORK_free | ( | struct PCFNN_NETWORK * | net | ) |
Free all memory allocation of an PCFNN_NETWORK (It will call PCFNN_LAYER_free)
[in] | net | (struct PCFNN_NETWORK*) a pointer an a PCFNN_NETWORK to free |
Definition at line 21 of file network.c.
PCFNN_NETWORK_get_ram_usage | ( | struct PCFNN_NETWORK * | net | ) |
Give the number of bytes used by the PCFNN_NETWORK net and all PCFNN_LAYER it contains.
[in] | net | (struct PCFNN_NETWORK*) a pointer an a PCFNN_NETWORK |
Definition at line 95 of file network.c.
PCFNN_NETWORK_new | ( | ) |
Initialize a PCFNN_NETWORK.
PCFNN_NETWORK_print_summary | ( | struct PCFNN_NETWORK * | net | ) |
Print neural network summary.
[in] | net | (struct PCFNN_NETWORK*) a pointer an a PCFNN_NETWORK |
Definition at line 126 of file network.c.
PCFNN_NETWORK_summary | ( | struct PCFNN_NETWORK * | net, |
size_t | param[5] | ||
) |
Write on param network statistics.
[in] | net | (struct PCFNN_NETWORK*) a pointer an a PCFNN_NETWORK |
[out] | param | (size_t) network statistics param[0]: number of unlocked parameters param[1]: number of locked parameters param[2]: ram usage in bytes param[3]: number of layer param[4]: number of neurons |
Definition at line 106 of file network.c.