Example #1
0
        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));
            }
        }
Example #2
0
 public void Calculate_value()
 {
     Value = sigmoid(Connections_Input.Sum(a => a.Input_Neuron.Value * a.Weight) + Bias);
 }