INeuralNetwork.SetInputValues

Syntax

SetInputValues(Var InputValues: Array);

Parameters

InputValues. Real array of network input values.

Description

The SetInputValues method assigns network input values.

Comments

Input values should be assigned before network calculation.

The number of the elements of the InputValues array must correspond to the number of network inputs. If the number of elements and the number of inputs do not correspond to each other, exception is thrown while the SetInputValues method is executed.

Example

As an example, a function is given, which input has neural network fed into (the Net parameter). To execute the example, add a link to the NN system assembly.

Function n_SetInputValues(Net: NeuralNetwork): NeuralNetwork;
Var
    InputVal: Array Of Double;
    i: Integer;
Begin
    InputVal := Net.GetInputValues;
    For i := 0 To InputVal.Length - 1 Do
        InputVal[i] := InputVal[i] + 0.02 * (i + 1);
    End For;
    Net.SetInputValues(InputVal);
    net.ApplyConvexCombinationFactor(0.5);
    Return Net;
End Function n_SetInputValues;

After executing the example the network input values are enlarged. Convex combinatorial transformation is also applied to them.

See also:

INeuralNetwork