The Complete SPRLIB & ANNLIB

create_ff_units

- create all units for a feedforward network (LOCAL)

SYNOPSIS

int create_ff_units (NumLayers, UnitVect, net)

ARGUMENTS

int NumLayers The number of layers of the network to be created.
int *UnitVect A vector specifying, for each layer, the number of units.
NET *net A pointer to a NET structure for which the units should be made.

RETURNS

TRUE if an error was detected, FALSE if not.

FUNCTION

This function builds a doubly linked list of UNIT structures and fills them with default values: UnitName = FFUNIT_TEXT (see FEEDFORWARD-constants); UnitId, LayerId, UnitFlag, InOutIndex, NumInLinks and NumOutLinks are appropriately filled; the transfer function of the biases (theta's) is set to TransSigmoid (as is the derivative); the activation function is set to ActInprod and the bias WeightFlag is set to VARWEIGHT (see WEIGHT-flags), except for input units: their bias' WeightFlag is set to FixWeight and their transfer and activation functions are set to NULL. The units are not yet linked. The NET structure's FirstUnit and LastUnit fields are filled with the first and last element of the linked list.

NOTE

This function is used by create_ff_net. The function malloc_unit is used to allocate memory for the units.

SEE ALSO

create_ff_net

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998