public void CalculateOutputLayerSignalError(double[] Desired)
 {
     for (int i = 0; i < this.Neurons.Length; ++i)
     {
         double DiffY = new ActivationFunctions().D_Sigmoid(this.Neurons[i].V, 1.0);
         //double DiffY = new ActivationFunctions().D_Hyperb(this.Neurons[i].V);
         this.Neurons[i].SignalError = (Desired[i] - this.Neurons[i].Y) * DiffY;
     }
 }
 public void CalculateSignalError(Layer L)
 {
     for (int i = 0; i < this.NumberOfNeurons; ++i)
     {
         double sum = 0;
         for (int j = 0; j < L.Neurons.Length; ++j)
         {
             sum += L.Neurons[j].SignalError * L.Neurons[j].Weights[i + 1];
         }
         double DiffY = new ActivationFunctions().D_Sigmoid(this.Neurons[i].V, 1.0);
         // double DiffY = new ActivationFunctions().D_Hyperb(this.Neurons[i].V);
         this.Neurons[i].SignalError = DiffY * sum;
     }
 }