Esempio n. 1
0
 private void InitWeights()
 {
     Inputs = new List <ISynapse>();
     for (int i = 0; i < InputCount; i++)
     {
         ISynapse Input  = new Synapse();
         Random   random = new Random((int)DateTime.Now.Ticks);
         Input.Weight         = random.NextDouble();
         Input.PreviousWeight = 0;
         Inputs.Add(Input);
     }
 }
Esempio n. 2
0
 public override void UpdateWeight(double learningRate, double delta)
 {
     Inputs.ForEach(Synapse => {
         Synapse.UpdateWeight(learningRate, delta);
     });
 }