* Get the symbolic output tensors of the node to which a given fetch belongs. * @param fetch The fetched symbolic tensor. * @returns The Array of symbolic tensors output by the node to which `fetch` * belongs.
(fetch: SymbolicTensor)
| 520 | * belongs. |
| 521 | */ |
| 522 | function getNodeOutputs(fetch: SymbolicTensor): SymbolicTensor| |
| 523 | SymbolicTensor[] { |
| 524 | let layerOutputs: SymbolicTensor|SymbolicTensor[]; |
| 525 | if (fetch.sourceLayer.inboundNodes.length === 1) { |
| 526 | layerOutputs = fetch.sourceLayer.output; |
| 527 | } else { |
| 528 | let nodeIndex: number = null; |
| 529 | for (let i = 0; i < fetch.sourceLayer.inboundNodes.length; ++i) { |
| 530 | for (const outputTensor of fetch.sourceLayer.inboundNodes[i] |
| 531 | .outputTensors) { |
| 532 | if (outputTensor.id === fetch.id) { |
| 533 | nodeIndex = i; |
| 534 | break; |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | layerOutputs = fetch.sourceLayer.getOutputAt(nodeIndex); |
| 539 | } |
| 540 | return layerOutputs; |
| 541 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…