Esempio n. 1
0
 /// <summary>
 /// Backpropagate all neurons of the network starting from this layer.
 /// </summary>
 public void RecursiveTrainCurrentPattern()
 {
     TrainCurrentPattern();
     if (_sourceLayer != null)
     {
         _sourceLayer.RecursiveTrainCurrentPattern();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Backpropagate the network.
 /// </summary>
 /// <param name="calculateBefore">Propagate the network before backpropagation (recommended).</param>
 /// <param name="calculateAfter">Propagate the network after backpropagation.</param>
 public void TrainCurrentPattern(bool calculateBefore, bool calculateAfter)
 {
     if (calculateBefore)
     {
         CalculateFeedforward();
     }
     _lastLayer.RecursiveTrainCurrentPattern();
     if (calculateAfter)
     {
         CalculateFeedforward();
     }
 }