Neuron connection

Every neuron must be connected to other neurons, and our neuron constructor will handle connecting all the input neurons with the synapses, as follows:

public Neuron(IEnumerable<Neuron> inputNeurons) : this()
{
Ensure.That(inputNeurons).IsNotNull();

foreach (var inputNeuron in inputNeurons)
{
var synapse = new Synapse(inputNeuron, this);
inputNeuron?.OutputSynapses?.Add(synapse);
InputSynapses?.Add(synapse);
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset