예제 #1
0
 public NodeParameters(Parameter bias, double addRate, double removeRate, double enableRate, double disableRate,
                       FunctionParameters function)
 {
     Bias        = bias;
     AddRate     = addRate;
     RemoveRate  = removeRate;
     EnableRate  = enableRate;
     DisableRate = disableRate;
     Function    = function;
 }
예제 #2
0
        public static IActivationFunction GetRandom(Random random, FunctionParameters parameters)
        {
            switch (random.Next(3))
            {
            case 0:
                return(new Sigmoid(parameters.Coefficients.GetNew(random)));

            case 1:
                return(new LeakyRelu(parameters.Coefficients.GetNew(random),
                                     parameters.Coefficients.GetNew(random)));

            case 2:
                return(new Tanh(parameters.Coefficients.GetNew(random)));

            default:
                return(null);
            }
        }
예제 #3
0
 public NodeParameters(Parameter bias, FunctionParameters function) : this(bias, 0, 0, 0, 0, function)
 {
 }
예제 #4
0
 public void Mutate(Random random, FunctionParameters parameters)
 {
     _a += parameters.Coefficients.GetChange(random);
 }