Fix gradient descent
This commit is contained in:
@@ -54,6 +54,8 @@ class GradientDescentPerceptronTraining extends NetworkTraining
|
|||||||
$this->addIterationToBuffer($iterationError, [[$this->perceptron->getSynapticWeights()]]);
|
$this->addIterationToBuffer($iterationError, [[$this->perceptron->getSynapticWeights()]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->epochError /= $this->datasetReader->getEpochExamplesCount(); // Average error for the epoch
|
||||||
|
|
||||||
// Synaptic weights correction after each epoch
|
// Synaptic weights correction after each epoch
|
||||||
$synaptic_weights = $this->perceptron->getSynapticWeights();
|
$synaptic_weights = $this->perceptron->getSynapticWeights();
|
||||||
$new_weights = array_map(
|
$new_weights = array_map(
|
||||||
|
|||||||
Reference in New Issue
Block a user