INeuralNetwork.PropagateBP

Syntax

PropagateBP;

Description

The PropagateBP method propagates the signal in the back-propagation network.

Comments

A signal is an input vector. Output values of the neurons are calculated in the process of signal propagation. These values are the result of the network operation. To get output values, use the INeuralNetwork.GetOutputValues method.

When the INeuralNetwork.LearnBack method is executed, it implicitly calls PropagateBP.

Example

As an example, a function is given, input of which has learned back-propagation network fed into its input (the Net parameter). To execute the example, add links to the NN, IO system assemblies.

Function m_BPTest(Net: NeuralNetwork): NeuralNetwork;
Var
    NetFile: File;
    TextW: ITextWriter;
    i, NumberOfInp: Integer;
    inputs, outputs: Array Of Double;
Begin
    NetFile := New File.Create;
    TextW := NetFile.OpenTextWriter("C:/BPTest.txt"True);
    NumberOfInp := Net.GetNumberOfInputs;
    inputs := New Double[NumberOfInp];
    For i := 0 To NumberOfInp - 1 Do
        inputs[i] := 0.5;
    End For;
    Net.SetInputValues(inputs);
    Net.PropagateBP;
    outputs := Net.GetOutputValues;
    For i := 0 To outputs.Length - 1 Do
        TextW.WriteLnString(outputs[i].ToString);
    End For;
    Return Net;
End Function m_BPTest;

After executing the example the learned network tests assigned input data. Results of work of the network are written to the file C:/BPTest.txt.

See also:

INeuralNetwork