Fix linting
This commit is contained in:
@@ -62,14 +62,14 @@ class GradientDescentPerceptronTraining extends NetworkTraining
|
||||
// Synaptic weights correction after each epoch
|
||||
$synaptic_weights = $this->perceptron->getSynapticWeights();
|
||||
$new_weights = array_map(
|
||||
fn($weight, $weightIndex) => $weight + $this->learningRate * array_sum($epochCorrectorPerWeight[$weightIndex]),
|
||||
fn ($weight, $weightIndex) => $weight + $this->learningRate * array_sum($epochCorrectorPerWeight[$weightIndex]),
|
||||
$synaptic_weights,
|
||||
array_keys($synaptic_weights)
|
||||
);
|
||||
$this->perceptron->setSynapticWeights($new_weights);
|
||||
|
||||
$this->datasetReader->reset(); // Reset the dataset for the next iteration
|
||||
} while ($this->epoch < $this->maxEpochs && !$this->stopCondition());
|
||||
} while ($this->epoch < $this->maxEpochs && ! $this->stopCondition());
|
||||
|
||||
$this->iterationEventBuffer->flush(); // Ensure all iterations are sent to the frontend
|
||||
|
||||
@@ -82,6 +82,7 @@ class GradientDescentPerceptronTraining extends NetworkTraining
|
||||
if ($condition === true) {
|
||||
event(new PerceptronTrainingEnded('Le perceptron à atteint l\'erreur minimale', $this->sessionId, $this->trainingId));
|
||||
}
|
||||
|
||||
return $condition;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user