diff --git a/app/Models/GradientDescentPerceptronTraining.php b/app/Models/GradientDescentPerceptronTraining.php index 703aca0..a329cee 100644 --- a/app/Models/GradientDescentPerceptronTraining.php +++ b/app/Models/GradientDescentPerceptronTraining.php @@ -54,6 +54,8 @@ class GradientDescentPerceptronTraining extends NetworkTraining $this->addIterationToBuffer($iterationError, [[$this->perceptron->getSynapticWeights()]]); } + $this->epochError /= $this->datasetReader->getEpochExamplesCount(); // Average error for the epoch + // Synaptic weights correction after each epoch $synaptic_weights = $this->perceptron->getSynapticWeights(); $new_weights = array_map(