The Complete SPRLIB & ANNLIB

unif_fanin_rand_net

- randomize a network's weights with uniformly distributed samples

SYNOPSIS

void unif_fanin_rand_net (seed, min, max, net)

ARGUMENTS

int seed The seed for the random number generator random_seed.
double min These values indicate the range of the uniform
double max distribution from which the random values are drawn.
NET *net A pointer to a NET structure.

RETURNS

Nothing.

FUNCTION

Upon return, the network's weight and bias (theta) values are randomized with values drawn from a uniform distribution in the range min/F ... max/F. F is the fan-in of a unit, i.e. the number of incoming links (the UNIT structure's InLinks field). The function does not initialize UNITs with the DISUNIT flag set (see UNIT-flags) or WEIGHTs which do not have the VARWEIGHT flag set (see WEIGHT-flags). Unlike the unif_rand_net function, which traverses the NET structure's linked list of weights, this function traverses the UNIT structure's linked list of incoming links (InLinks) for each unit. Therefore, this function may be more time-consuming than unif_rand_net.

NOTE

If seed is a value other than 0, it is used as a seed. In this way, networks can be randomly initialized with the same value in repetitions of experiments. If seed is 0, however, the timer is used (the C-function time(0) ) as a seed.

SEE ALSO

random_seed, ran1, unif_rand_net, unif_jogg_net

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