fann_optimized_template.h

The fann optimized_is a MIMO neuron implementation.

Summary
The fann optimized_is a MIMO neuron implementation.
Allocates room inside the layer for neurons and connections.
Iterates over all neurons and calls the respective run functions.
Allocates room inside the neuron for the connections.
Does a forward iteration on the neuron.
Allocates room inside the neuron for training data structures.
Compute the error on a MIMO Neuron after forward propagation of a certain input vector i.e.
Train the MIMO neuron: this function backpropagates the error to the previous layer and computes the weight update.
Apply the training on the MIMO neuron: the weight update stored in the neuron is applied.
Allocates room inside the layer for training data structures.

Functions

MAKE_NAME(layer_constructor)

FANN_EXTERNAL int FANN_API MAKE_NAME(
   layer_constructor
)(struct fann *ann, struct fann_layer *layer, struct fann_layer_descr *descr)

Allocates room inside the layer for neurons and connections.  Adds one bias output set to 1.

MAKE_NAME(layer_run)

FANN_EXTERNAL void FANN_API MAKE_NAME(
   layer_run
)(struct fann *ann, struct fann_layer* layer)

Iterates over all neurons and calls the respective run functions.  The implementation is responsible for setting up the input array.  If data is not already there this function must copy it into the inpuit array before calling neuron_it->run().

MAKE_NAME(neuron_constructor)

FANN_EXTERNAL int FANN_API MAKE_NAME(
   neuron_constructor
)(struct fann *ann, struct fann_layer *layer, struct fann_neuron *neuron, struct fann_neuron_descr * descr)

Allocates room inside the neuron for the connections.  Creates a fully connected neuron.

MAKE_NAME(neuron_run)

FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_run
)(struct fann *ann, struct fann_neuron *neuron)

Does a forward iteration on the neuron.

MAKE_NAME(neuron_train_initialize)

FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_train_initialize
)(struct fann *ann, struct fann_layer *layer, struct fann_neuron *neuron)

Allocates room inside the neuron for training data structures.  This function is called just when it is necessary to allocate the space for training.  If a network is not going to be trainied (when using an already trainied network) all this stuff is not allocated.

MAKE_NAME(compute_MSE)

FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_compute_MSE
)(struct fann *ann, struct fann_neuron *neuron, fann_type *desired_output)

Compute the error on a MIMO Neuron after forward propagation of a certain input vector i.e. after neuron->run().  The error is the sum, over all the outputs, of the squared difference between the computed output and the desired target also increments a counter because MSE is an average of such errors

After calling this function on a neuron the train_errors array is set to

(desired_outputneuron_value)

MAKE_NAME(neuron_backprop)

FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_backprop
)(struct fann *ann, struct fann_neuron *neuron, fann_type *prev_layer_errors)

Train the MIMO neuron: this function backpropagates the error to the previous layer and computes the weight update.  The weight update is not applied here see <MAKE_NAME(neuron_update>)

MAKE_NAME(neuron_update)

FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_update
)(struct fann *ann, struct fann_neuron *neuron)

Apply the training on the MIMO neuron: the weight update stored in the neuron is applied.  This function is called once per input pattern when online training is carried on and once per epoch when batch algoritms are selected

MAKE_NAME(layer_train_initialize)

FANN_EXTERNAL void FANN_API MAKE_NAME(
   layer_train_initialize
)(struct fann *ann, struct fann_layer *layer)

Allocates room inside the layer for training data structures.  This function is called just when it is necessary to allocate the space for training.  If a network is not going to be trainied (when using an already trainied network) all this stuff is not allocated.

FANN_EXTERNAL int FANN_API MAKE_NAME(
   layer_constructor
)(struct fann *ann, struct fann_layer *layer, struct fann_layer_descr *descr)
Allocates room inside the layer for neurons and connections.
FANN_EXTERNAL void FANN_API MAKE_NAME(
   layer_run
)(struct fann *ann, struct fann_layer* layer)
Iterates over all neurons and calls the respective run functions.
FANN_EXTERNAL int FANN_API MAKE_NAME(
   neuron_constructor
)(struct fann *ann, struct fann_layer *layer, struct fann_neuron *neuron, struct fann_neuron_descr * descr)
Allocates room inside the neuron for the connections.
FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_run
)(struct fann *ann, struct fann_neuron *neuron)
Does a forward iteration on the neuron.
FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_train_initialize
)(struct fann *ann, struct fann_layer *layer, struct fann_neuron *neuron)
Allocates room inside the neuron for training data structures.
FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_compute_MSE
)(struct fann *ann, struct fann_neuron *neuron, fann_type *desired_output)
Compute the error on a MIMO Neuron after forward propagation of a certain input vector i.e.
FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_backprop
)(struct fann *ann, struct fann_neuron *neuron, fann_type *prev_layer_errors)
Train the MIMO neuron: this function backpropagates the error to the previous layer and computes the weight update.
FANN_EXTERNAL void FANN_API MAKE_NAME(
   neuron_update
)(struct fann *ann, struct fann_neuron *neuron)
Apply the training on the MIMO neuron: the weight update stored in the neuron is applied.
FANN_EXTERNAL void FANN_API MAKE_NAME(
   layer_train_initialize
)(struct fann *ann, struct fann_layer *layer)
Allocates room inside the layer for training data structures.