Пример #1
0
        public void CalculateOutputGradient(double target)
        {
            double delta = target - this.Output;

            this.Gradient = delta * Neuron.ActivationDerivative(this.Output);
        }
Пример #2
0
        /// <summary>
        /// Calculate the hidden gradient based on the sum
        /// of the weight to the nodes in the next layer
        /// multiplied by the hidden gradient of those
        /// nodes.
        /// </summary>
        public void CalculateHiddenGradient()
        {
            double dow = this.SumDOW();

            this.Gradient = dow * Neuron.ActivationDerivative(this.Output);
        }