public Neuron() { InputSynapses = new List <Synapse>(); OutputSynapses = new List <Synapse>(); Bias = 1; BiasWeight = Neuron.GetRandomBias(); TotalError = 0; C = 1; }
public Neuron(int layer, int index, double?bias = null) : this() { this.Layer = layer; this.Index = index; this.LearningRate = 1; this.BiasWeight = (bias == null) ? Neuron.GetRandomBias() : (double)bias; this.Output = 0; this.TotalError = 0; }
public Neuron(int layer, int index, List <Synapse> inputs, List <Synapse> outputs, double?bias = null) : this() { this.Layer = layer; this.Index = index; this.LearningRate = 1; this.BiasWeight = (bias == null) ? Neuron.GetRandomBias() : (double)bias; this.Output = 0; InputSynapses = inputs; OutputSynapses = outputs; this.TotalError = 0; }