Forward propagation

The following is our code for a basic forward propagation process:

private void ForwardPropagate(params double[] inputs)
{
var i = 0;
InputLayer?.ForEach(a =>a.Value = inputs[i++]);
HiddenLayers?.ForEach(a =>a.ForEach(b =>b.CalculateValue()));
OutputLayer?.ForEach(a =>a.CalculateValue());
}

To do ForwardPropagation, we basically sum all the inputs from each synapse and run the result through our Sigmoid function to get an output. The CalculateValue function does this for us.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset