예제 #1
0
 public double CalculateGradient(double?x = null)
 {
     if (x == null)
     {
         return(Gradient = Exit.Sum(y => y.ExitNeuron.Gradient * y.Weight) * Sigmoid.DerivativeSigmoid(Value));
     }
     return(Gradient = CalculateError(x.Value) * Sigmoid.DerivativeSigmoid(Value));
 }
예제 #2
0
 public virtual double CalculateEntry()
 {
     return(Value = Sigmoid.CalculateSigmoid(Entry.Sum(x => x.Weight * x.EntryNeuron.Value) + Bias));
 }