public Neuron(List <Neuron> input_neurons) : this() { Bias = new Random().NextDouble(-1, 1); foreach (Neuron n in input_neurons) { Connections_Input.Add(new Connection(n, this)); n.Connections_Output.Add(new Connection(n, this)); } }
public void Calculate_value() { Value = sigmoid(Connections_Input.Sum(a => a.Input_Neuron.Value * a.Weight) + Bias); }