| Conditions | 6 |
| Paths | 12 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | public function setInput($input) |
||
| 70 | { |
||
| 71 | $firstLayer = $this->layers[0]; |
||
| 72 | |||
| 73 | foreach ($firstLayer->getNodes() as $key => $neuron) { |
||
| 74 | if ($neuron instanceof Input) { |
||
| 75 | $neuron->setInput($input[$key]); |
||
| 76 | } |
||
| 77 | } |
||
| 78 | |||
| 79 | foreach ($this->getLayers() as $layer) { |
||
| 80 | foreach ($layer->getNodes() as $node) { |
||
| 81 | if ($node instanceof Neuron) { |
||
| 82 | $node->reset(); |
||
| 83 | } |
||
| 84 | } |
||
| 85 | } |
||
| 86 | |||
| 87 | return $this; |
||
| 88 | } |
||
| 89 | } |
||
| 90 |