SetSigmoidFuncsEx(NeuronSigmoidFuncsType: Integer; layerIndex: Integer);
SetSigmoidFuncsEx(NeuronSigmoidFuncsType: integer; layerIndex: integer);
NeuronSigmoidFuncsType. Type of the function of signal propagation in the network.
layerIndex. Index of the network layer.
The SetSigmoidFuncs method sets the type of signal propagation in the network for the specified layer.
The range of network output values depends on the type of signal propagation. Available values of the parameter:
0. Default value. Exponential function (sigmoid) is used. Range of output values is shifted: [-0.5; 0.5].
1. Threshold function is used that returns true if the calculated value is less than zero, and false if the calculated value is greater than zero. Therefore, the output values consist of zeros and ones.
2. Function of hyperbolic tangent (similar to sigmoid). Range of output values: [-1.0; 1.0].
3. Exponential function (sigmoid). Range of output values is shifted: [-0.5; 0.5].
4. Exponential function (sigmoid). Range of output values: [0.0; 1.0].
5. Exponential function (bipolar sigmoid). Range of output values: [-1.0; 1.0].
Indexation of layers is continuous and starts with zero.
As an example, a function is given, which input has a neural network fed into (the Net parameter). To execute the example, add a link to the NN system assembly.
Function m_SetSigmoidFuncsEx(Net: NeuralNetwork): NeuralNetwork;
Var
i, lCount: Integer;
Begin
lCount := Net.GetNumberOfLayers;
For i := 0 To lCount - 1 Do
Net.SetSigmoidFuncsEx(2, i);
End For;
Return Net;
End Function m_SetSigmoidFuncsEx;
After executing the example the function of hyperbolic tangent is used for all the neurons in the network.
As an example, a function is given, which input has a neural network fed into (the Net parameter).
Public Shared Function m_SetSigmoidFuncsEx(Net: NeuralNetwork): NeuralNetwork;
Var
i, lCount: Integer;
Begin
lCount := Net.GetNumberOfLayers();
For i := 0 To lCount - 1 Do
Net.SetSigmoidFuncsEx(2, i);
End For;
Return Net;
End Function;
After executing the example the function of hyperbolic tangent is used for all the neurons in the network.
See also: