Exemplo n.º 1
0
        private double sumDOW(Layer nextLayer)
        {
            double sum = 0.0;

            sum = nextLayer.Select((n, i) => outputWights[i].Weight * n.Gradient).Sum();
            return(sum);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Set the output value of the layer that we are in.
        /// (Wich layer is deffind by the Network class)
        /// </summary>
        /// <param name="perviousLayer">The Layer before the layer that we are adjusting</param>
        public void feedForward(Layer perviousLayer)
        {
            double sum = 0.0;

            sum         = perviousLayer.Select(N => N.outputValue * N.getOutputWeightOf(this.Index)).Sum();
            sum        += bias;
            outputValue = activationFunction(sum);
        }