コード例 #1
0
 public Neuron(List <double> weights, double bias, mathFunction activationFunction)
 {
     this.activationFunction = activationFunction;
     this.init(weights.Count);
     this.weights = weights;
     this.bias    = bias;
 }
コード例 #2
0
 public Neuron(List<double> weights, double bias, mathFunction activationFunction)
 {
     this.activationFunction = activationFunction;
     this.init(weights.Count);
     this.weights = weights;
     this.bias = bias;
 }
コード例 #3
0
 /*Constructors*/
 public Neuron(int numOfinput, mathFunction activationFunction,bool LMS)
 {
     this.activationFunction = activationFunction;
     if (!LMS)
         this.init(numOfinput);
     else
         this.initLMS(numOfinput);
 }
        // least mean square
        public void LMSsetLayer(int layerIndex, mathFunction activationFunction)
        {
            if (layerIndex == 0)
                throw new Exception("Can't set Input Layer");

            for (int i = 0; i < this.numOfNeuronsPerLayer[layerIndex]; ++i)
            {
                Neuron neuron = new Neuron(this.numOfNeuronsPerLayer[layerIndex - 1], activationFunction,true);
                this.network[layerIndex - 1].Add(neuron);
            }
        }
コード例 #5
0
 /*Constructors*/
 public Neuron(int numOfinput, mathFunction activationFunction, bool LMS)
 {
     this.activationFunction = activationFunction;
     if (!LMS)
     {
         this.init(numOfinput);
     }
     else
     {
         this.initLMS(numOfinput);
     }
 }
コード例 #6
0
        // least mean square
        public void LMSsetLayer(int layerIndex, mathFunction activationFunction)
        {
            if (layerIndex == 0)
            {
                throw new Exception("Can't set Input Layer");
            }

            for (int i = 0; i < this.numOfNeuronsPerLayer[layerIndex]; ++i)
            {
                Neuron neuron = new Neuron(this.numOfNeuronsPerLayer[layerIndex - 1], activationFunction, true);
                this.network[layerIndex - 1].Add(neuron);
            }
        }