Spiking Neuron Network Simulator  1.0
Simulation and training of spiking neuron networks, primarily theta neurons
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
SteepestDescentWithMomentumTraining.cs
Go to the documentation of this file.
1 namespace SpikingNeuronNetwork.Lib.Training
2 {
3  using Interfaces;
4 
9  {
16  public void UpdateWeights(TrainingStats trainingStats, IErrorDerivativeParameters errorDerivativeParameters,
17  IErrorDerivativeParameters previousErrorDerivativeParameters)
18  {
19  foreach (var synapse in errorDerivativeParameters.GetSynapses())
20  {
21  trainingStats.CurrentNetwork.SetSynapticWeight(synapse,
22  trainingStats.CurrentNetwork.GetSynapticWeight(synapse) -
23  trainingStats.LearningRate * errorDerivativeParameters.GetErrorDerivative(synapse) -
24  trainingStats.MomentumLearningRate * (previousErrorDerivativeParameters == null ? 0 : previousErrorDerivativeParameters.GetErrorDerivative(synapse)));
25  }
26  }
27  }
28 }
Steepest Descent Training With Momentum Class, inherits from ITrainingAlgorithm
void UpdateWeights(TrainingStats trainingStats, IErrorDerivativeParameters errorDerivativeParameters, IErrorDerivativeParameters previousErrorDerivativeParameters)
Update the weights in the current network according to the training algorithm