Network_ml
[Network]


Data Structures

struct  aspi_network_ml_t
 Network_ml structure. More...
struct  aspi_network_ml_class_t
 Network_ml class structure. More...

Defines

#define ASPI_NETWORK_ML(x)   (aspi_object_check (x, aspi_network_ml ()), ((aspi_network_ml_t *) x))
#define ASPI_NETWORK_ML_CLASS(x)   (aspi_class_check (x, aspi_network_ml ()), ((aspi_network_ml_class_t * ) x))

Functions

aspi_class_taspi_network_ml (void)
void aspi_network_ml_dtor (aspi_object_t *self)
aspi_object_taspi_network_ml_dup (aspi_object_t *self)
aspi_object_taspi_network_ml_init (aspi_object_t *self, aspi_class_t *model, int layers, int *neurons, double *mu_weights, double *sigma_weights, double *mu_delays, double *sigma_delays)
aspi_object_taspi_network_ml_init_poisson (aspi_object_t *self, aspi_class_t *model, int layers, int *neurons, double *connectivity, double *mu_weights, double *sigma_weights, double *lambda_delays)
aspi_object_taspi_network_ml_init_sparse (aspi_object_t *self, aspi_class_t *model, int layers, int *neurons, double *connectivity, double *mu_weights, double *sigma_weights, double *mu_delays, double *sigma_delays)
int aspi_network_ml_get_neuron_index (aspi_object_t *self, int layer, int neuron)
aspi_object_taspi_network_ml_get_neuron (aspi_object_t *self, int layer, int neuron)
int aspi_network_ml_get_layers (aspi_object_t *self)
int aspi_network_ml_get_layer_size (aspi_object_t *self, int layer)

Detailed Description

This network can have n layers. Using it should be pretty straightforward, even if it can require a pretty long list of arguments

Define Documentation

#define ASPI_NETWORK_ML (  )     (aspi_object_check (x, aspi_network_ml ()), ((aspi_network_ml_t *) x))

#define ASPI_NETWORK_ML_CLASS (  )     (aspi_class_check (x, aspi_network_ml ()), ((aspi_network_ml_class_t * ) x))


Function Documentation

aspi_class_t * aspi_network_ml ( void   ) 

void aspi_network_ml_dtor ( aspi_object_t self  ) 

aspi_object_t * aspi_network_ml_dup ( aspi_object_t self  ) 

Copy the multi-layer network; the weights remain shared

References aspi_network_dup(), ASPI_NETWORK_ML, ASPI_OBJECT, aspi_return_value_if_fail, aspi_network_ml_t::layer_sizes, and aspi_network_ml_t::layers.

Referenced by aspi_network_ml().

int aspi_network_ml_get_layer_size ( aspi_object_t self,
int  layer 
)

Return the size of layer

Parameters:
layer,: number of the layer

References ASPI_NETWORK_ML, aspi_return_value_if_fail, and aspi_network_ml_t::layer_sizes.

int aspi_network_ml_get_layers ( aspi_object_t self  ) 

Return the number of layers in the network

References ASPI_NETWORK_ML, and aspi_network_ml_t::layers.

aspi_object_t * aspi_network_ml_get_neuron ( aspi_object_t self,
int  layer,
int  neuron 
)

Return the nth neuron of layer l

Parameters:
layer,: number of the layer
neuron,: number of the neuron
Returns:
the neuron in question

References aspi_network_get_neuron(), and aspi_network_ml_get_neuron_index().

int aspi_network_ml_get_neuron_index ( aspi_object_t self,
int  layer,
int  neuron 
)

Return the number of the ntn neuron of layer l

Parameters:
layer,: number of the layer
neuron,: number of the neuron
Returns:
the index of the corresponding neuron, or -1 on error

References ASPI_NETWORK_ML, aspi_return_value_if_fail, and aspi_network_ml_t::layer_sizes.

Referenced by aspi_network_ml_get_neuron().

aspi_object_t * aspi_network_ml_init ( aspi_object_t self,
aspi_class_t model,
int  layers,
int *  neurons,
double *  mu_weights,
double *  sigma_weights,
double *  mu_delays,
double *  sigma_delays 
)

Init the multi-layer network

Parameters:
self,: an alloced aspi_network_ml_t *, or NULL
model : a neuron class, used to simulate all neurons
layers : the number of layers
neurons : the number of neurons in each layer
mu_(weights,delays),sigma_(weights,delays) : array containing mu and sigma of weights and delays, or NULL. If null, they are taken to zero ; if not null, param[i * size + j] correspond to the value from i to j. E.g : {1.0, 0.1, -0.1, 1.0} will put 1.0 as parameter from layer 0 to layer 0, 0.1 from layer 0 to 1, -0.1 from 1 to 0 and 1 from 1 to 1
Note that if sigma_weight is NULL, mu_weight is assumed to be null, and vice-versa. Same thing for delay. Set the two if you want it to work.

References aspi_network_ml_init_sparse().

aspi_object_t * aspi_network_ml_init_poisson ( aspi_object_t self,
aspi_class_t model,
int  layers,
int *  neurons,
double *  connectivity,
double *  mu_weights,
double *  sigma_weights,
double *  lambda_delays 
)

Init a network with delays that follow a poisson law instead of a gaussian

Same as aspi_network_ml_init, but using a poisson law instead of a gaussian ones for delays.

A gaussian law is still used for weights

References aspi_misc_random_poisson(), aspi_network_calc_max_delays(), aspi_network_ml_init_sparse(), aspi_network_set_delay(), and aspi_return_value_if_fail.

aspi_object_t * aspi_network_ml_init_sparse ( aspi_object_t self,
aspi_class_t model,
int  layers,
int *  neurons,
double *  connectivity,
double *  mu_weights,
double *  sigma_weights,
double *  mu_delays,
double *  sigma_delays 
)

Create a sparse network

Parameters:
self,: an alloced aspi_network_ml_t, or NULL
model : a neuron class, used to simulate all neurons
layers : the number of layers
neurons : the number of neurons in each layer
mu_(weights,delays),sigma_(weights,delays) : array containing mu and sigma of weights and delays, or NULL. If null, they are taken to zero ; if not null, param[i * size + j] correspond to the value from i to j. E.g : {1.0, 0.1, -0.1, 1.0} will put 1.0 as parameter from layer 0 to layer 0, 0.1 from layer 0 to 1, -0.1 from 1 to 0 and 1 from 1 to 1
connectivity,: the number of weights to be set. It must be between 0 and 1. If it is 0, there is absolutely no connection between neurons; if it is 1, all neurons are connected. If NULL, considered to be 1 everywhere.
Note that if sigma_weight is NULL, mu_weight is assumed to be null, and vice-versa. Same thing for delay. Set the two if you want it to work.

References aspi_basic_synapses(), aspi_class_instantiate(), aspi_misc_random_gaussian(), aspi_misc_random_number(), aspi_network_calc_max_delays(), aspi_network_init_full(), ASPI_NETWORK_ML, aspi_network_ml(), aspi_network_set_delay(), aspi_network_set_weight(), aspi_network_ml_t::layer_sizes, and aspi_network_ml_t::layers.

Referenced by aspi_network_ml_init(), and aspi_network_ml_init_poisson().


Generated on Wed Aug 19 01:16:49 2009 for aspirenn by  doxygen 1.5.5