Neurons

We've already discussed what a neuron is, now it's time to express it in code so developers like us can make more sense of it! As you can see, we have both our input and output synapses, our Bias and the Bias Delta, the Gradient, and the actual value of the neuron. The neuron calculates the weighted sum of its inputs, adds a bias, and then decides if the output should 'fire' - 'be on'- or not:

public class Neuron
{
public Guid Id{ get; set; }

The synapse that connects to our input side
public List<Synapse> InputSynapses{ get; set; }

The synapse that connects to our output side
public List<Synapse> OutputSynapses{ get; set; }
public double Bias{ get; set; }

Our bias values
public double BiasDelta{ get; set; }
public double Gradient{ get; set; }

The input value to the neuron
public double Value{ get; set; }

Is the neuron a mirror neuron
public bool IsMirror{ get; set; }

Is the neuron a canonical neuron
public bool IsCanonical{ get; set; }

}
..................Content has been hidden....................

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