Пример #1
0
 public override void addNeurons(int count)
 {
     for (int i = 0; i < count; i++)
     {
         WorkingNeuron wn = new WorkingNeuron();
         workingNeurons.Add(wn);
     }
 }
Пример #2
0
            public WorkingNeuron createNewOuptput(int x, int y)
            {
                WorkingNeuron wn = new WorkingNeuron();

                wn.x          = x;
                wn.y          = y;
                wn.neuronType = NeuronType.WorkingNeuron;
                outputNeurons.Add(wn);
                return(wn);
            }
Пример #3
0
 public void createHiddenNeurons(int amount)
 {
     for (int i = 0; i < amount; i++)
     {
         WorkingNeuron hn = new WorkingNeuron();
         hn.x          = 1;
         hn.y          = i;
         hn.neuronType = NeuronType.WorkingNeuron;
         hiddenNeurons.Add(hn);
     }
 }
Пример #4
0
 public void backpropagateSmallDelta()
 {
     foreach (Connection c in connections)
     {
         Neuron n = c.getNeuron();
         if (n.GetType() == typeof(WorkingNeuron))
         {
             WorkingNeuron wn = (WorkingNeuron)n;
             wn.smallDelta += this.smallDelta * c.getWeight();
         }
     }
 }