Пример #1
0
 public void SetInputConnections(NeuronInputConnection[] _inputs)
 {
     inputs = new NeuronInputConnection[_inputs.Length];
     for (int i = 0; i < _inputs.Length; i++)
     {
         inputs[i] = new NeuronInputConnection(_inputs[i].weigth, _inputs[i].inputValue, _inputs[i].indexOfInputNeuron);
     }
 }
Пример #2
0
 public void SetInputConnections(NeuronInputConnection[] _inputs)
 {
     inputs = new NeuronInputConnection[_inputs.Length];
     for (int i = 0; i < _inputs.Length; i++)
     {
         inputs[i] = new NeuronInputConnection(_inputs[i].weigth, _inputs[i].inputValue, _inputs[i].indexOfInputNeuron);
     }
 }
Пример #3
0
 public InputNeuron(ActivateFunction af, double inputValue, NeuronInputConnection[] _inputs)
 {
     act_func = af;
     InputValue = inputValue;
     SetInputConnections(_inputs);
 }
Пример #4
0
        private void setInputConnections()
        {
            for (int indexNeuron = 0; indexNeuron < NeuronsCount; indexNeuron++)
            {
                int count = 0;
                for (int i = 0; i < NeuronsCount; i++)
                {
                    if (topology[i, indexNeuron] == true)
                    {
                        count++;
                    }
                }

                NeuronInputConnection[] res = new NeuronInputConnection[count];
                count = 0;
                for (int i = 0; i < NeuronsCount; i++)
                {
                    if (topology[i, indexNeuron] == true)
                    {
                        res[count] = new NeuronInputConnection(weights[i, indexNeuron], i);
                        count++;
                    }
                }
                neurons[indexNeuron].SetInputConnections(res);
            }
        }
Пример #5
0
 public OutputNeuron(ActivateFunction af, NeuronInputConnection[] _inputs)
 {
     act_func = af;
     SetInputConnections(_inputs);
 }