Calculating a gradient

The gradient is calculated by considering the Derivative of the Sigmoid function:

public double CalculateGradient(double? target = null)
{
if (target == null)
return Gradient = OutputSynapses.Sum(a =>a.OutputNeuron.Gradient *
a.Weight) * Sigmoid.Derivative(Value);

return Gradient = CalculateError(target.Value) * Sigmoid.Derivative(Value);
}
..................Content has been hidden....................

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