コード例 #1
0
 public Neuron()
 {
     InputSynapses  = new List <Synapse>();
     OutputSynapses = new List <Synapse>();
     Bias           = 1;
     BiasWeight     = Neuron.GetRandomBias();
     TotalError     = 0;
     C = 1;
 }
コード例 #2
0
        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;
        }
コード例 #3
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;
        }