예제 #1
0
파일: Trainers.cs 프로젝트: HeyMika/CG-AI
        /// <summary>
        /// Initialze the trainer object. The error function is used to decide how much the output is wrong and where.
        /// </summary>
        public Trainer(SequentialNet nn, Func <float[], float[], bool, float[]> errorFunction, float learningRate, bool printError = true)
        {
            NeuralNet = nn;

            ErrorFunc = errorFunction;
            if (ErrorFunc == null)
            {
                throw new NullReferenceException("Error function is null.");
            }

            LearningRate = learningRate;

            this.printError = printError;
        }
예제 #2
0
파일: Trainers.cs 프로젝트: HeyMika/CG-AI
 public BackPropagation(SequentialNet nn, Func <float[], float[], bool, float[]> errorFunction, float learningRate, bool printError = true)
     : base(nn, errorFunction, learningRate, printError)
 {
 }