Esempio n. 1
0
        void ComputeBackward(LearningExample learningExample, INeuralNetAccessor outputGradient)
        {
            int lastLayer = neuralNetAccessor.NumberOfLayers - 1;

            ComputeLastDeltas(learningExample.Output, outputGradient);
            ComputeWeightGradients(lastLayer, learningExample.Input, outputGradient);
            for (int layer = lastLayer - 1; layer >= 0; layer--)
            {
                ComputeDeltas(layer, outputGradient);
                ComputeWeightGradients(layer, learningExample.Input, outputGradient);
            }
        }
Esempio n. 2
0
 public void BackPropagate(LearningExample learningExample, INeuralNetAccessor outputGradient)
 {
     ComputeForward(learningExample.Input);
     ComputeBackward(learningExample, outputGradient);
 }