Fix gradient descent
Some checks failed
linter / quality (push) Successful in 4m56s
tests / ci (8.4) (push) Failing after 4m21s
tests / ci (8.5) (push) Failing after 4m44s

This commit is contained in:
2026-03-22 10:42:15 +01:00
parent 4717254da4
commit 8af26db16c

View File

@@ -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(