示例#1
0
文件: Neuron.cs 项目: juraam/SII
 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
文件: Neuron.cs 项目: Nikita94/SII
 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
文件: NeuroNet.cs 项目: Nikita94/SII
        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);
 }