Refactored into folders

This commit is contained in:
2026-03-22 10:42:08 +01:00
parent 977c259cb9
commit 4717254da4
18 changed files with 258 additions and 44 deletions

View File

@@ -0,0 +1,14 @@
<?php
namespace App\Services\SynapticWeightsProvider;
class RandomSynapticWeights implements ISynapticWeightsProvider {
public function generate(int $input_size): array
{
$weights = [];
for ($i = 0; $i < $input_size + 1; $i++) { // +1 for bias weight
$weights[] = rand(-100, 100) / 100; // Random weights between -1 and 1
}
return $weights;
}
}