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); } }
public InputNeuron(ActivateFunction af, double inputValue, NeuronInputConnection[] _inputs) { act_func = af; InputValue = inputValue; SetInputConnections(_inputs); }
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); } }
public OutputNeuron(ActivateFunction af, NeuronInputConnection[] _inputs) { act_func = af; SetInputConnections(_inputs); }