AdvancedOCR.MarkingWeights.PropogateForward C# (CSharp) Méthode

PropogateForward() protected méthode

protected PropogateForward ( Step downstream, int output ) : void
downstream Step
output int
Résultat void
        protected void PropogateForward(Step downstream, int output)
        {
            double sumSquaredError = 0;
            int inputIndex = 0;
            int definitionIndex = output * InputLength;
            foreach (Step upstream in downstream.Upstream)
            {
                Debug.Assert(inputIndex + upstream.Length <= InputLength);
                for (int i = 0; i < upstream.Length; i++)
                {
                    double difference = upstream.Output[i] - ClassStateDefinitions[definitionIndex];
                    sumSquaredError += difference * difference;

                    inputIndex += 1;
                    definitionIndex += 1;
                }
            }
            downstream.Output[output] = sumSquaredError;
        }