@@ -142,6 +142,9 @@ |
||
142 | 142 | $this->addLayer(new Layer($nodes, Input::class)); |
143 | 143 | } |
144 | 144 | |
145 | + /** |
|
146 | + * @param ActivationFunction $defaultActivationFunction |
|
147 | + */ |
|
145 | 148 | private function addNeuronLayers(array $layers, ?ActivationFunction $defaultActivationFunction = null): void |
146 | 149 | { |
147 | 150 | foreach ($layers as $layer) { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Phpml\NeuralNetwork\Network; |
6 | 6 | |
@@ -146,9 +146,9 @@ discard block |
||
146 | 146 | { |
147 | 147 | foreach ($layers as $layer) { |
148 | 148 | if (is_array($layer) && end($layer) instanceof ActivationFunction) { |
149 | - $this->addLayer(new Layer($layer[0], Neuron::class, $layer[1])); |
|
149 | + $this->addLayer(new Layer($layer[0], Neuron::class, $layer[1])); |
|
150 | 150 | } else { |
151 | - $this->addLayer(new Layer($layer, Neuron::class, $defaultActivationFunction)); |
|
151 | + $this->addLayer(new Layer($layer, Neuron::class, $defaultActivationFunction)); |
|
152 | 152 | } |
153 | 153 | } |
154 | 154 | } |