| Conditions | 6 |
| Paths | 12 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 61 | public function setInput($input) |
||
| 62 | { |
||
| 63 | $firstLayer = $this->layers[0]; |
||
| 64 | |||
| 65 | foreach ($firstLayer->getNodes() as $key => $neuron) { |
||
| 66 | if ($neuron instanceof Input) { |
||
| 67 | $neuron->setInput($input[$key]); |
||
| 68 | } |
||
| 69 | } |
||
| 70 | |||
| 71 | foreach ($this->getLayers() as $layer) { |
||
| 72 | foreach ($layer->getNodes() as $node) { |
||
| 73 | if ($node instanceof Neuron) { |
||
| 74 | $node->refresh(); |
||
| 75 | } |
||
| 76 | } |
||
| 77 | } |
||
| 78 | |||
| 79 | return $this; |
||
| 80 | } |
||
| 81 | } |
||
| 82 |