Docs
NAME
computeAbstractNeurons - perform a discrete simulation of the abstract neurons to compute their output signals
SYNOPSIS
function computeAbstractNeurons(neurons, times);
DESCRIPTION
The function is used to perform a discrete simulation of the abstract neurons with ids neurons. Simulation consists of times steps. At each step, the consecutive computation of all output signals will be performed, starting from the first neuron. More than one step is required only if the neural network has a feedback.
RETURN VALUES
None.
EXAMPLES
A simple case:
connectors = createAbstractConnectors(6); weights = createAbstractWeights(5); procUnit = createProcUnit(PROC_UNIT.WEIGHTED_SUM); actFunc = createActFunc(ACT_FUNC.LINEAR, 1.0, 0.0); setSignals(connectors, 0, {1.0}); -- Connector 0 represents a bias input; neuron1 = createAbstractNeuron(3, {0, 2, 1}, connectors, 3, weights, 0, procUnit, actFunc); setAbstractWeights(neuron1, {7.0, 10.0, 5.0}); -- Set neuron1 weights; setSignals(connectors, 1, {0.2, 0.1}); -- Set neuron1 input signals; neuron2 = createAbstractNeuron(2, {0, 4}, connectors, 5, weights, 3, procUnit, actFunc); setAbstractWeights(neuron2, {4.0, 2.0}); -- Set neuron2 weights; setSignals(connectors, 4, {0.5}); -- Set neuron2 input signals; computeAbstractNeurons({neuron1, neuron2}, 1); out1 = getSignals(connectors, 3, 1); -- {9.0} out2 = getSignals(connectors, 5, 1); -- {5.0}