Retrieves the input tensor(s) of a layer. Only applicable if the layer has exactly one input, i.e. if it is connected to one incoming layer. Returns: Input tensor or list of input tensors. Raises: RuntimeError: If called in Eager mode. AttributeError: If no inb
(self)
| 1562 | |
| 1563 | @property |
| 1564 | def input(self): |
| 1565 | """Retrieves the input tensor(s) of a layer. |
| 1566 | |
| 1567 | Only applicable if the layer has exactly one input, |
| 1568 | i.e. if it is connected to one incoming layer. |
| 1569 | |
| 1570 | Returns: |
| 1571 | Input tensor or list of input tensors. |
| 1572 | |
| 1573 | Raises: |
| 1574 | RuntimeError: If called in Eager mode. |
| 1575 | AttributeError: If no inbound nodes are found. |
| 1576 | """ |
| 1577 | if not self._inbound_nodes: |
| 1578 | raise AttributeError('Layer ' + self.name + |
| 1579 | ' is not connected, no input to return.') |
| 1580 | return self._get_node_attribute_at_index(0, 'input_tensors', 'input') |
| 1581 | |
| 1582 | @property |
| 1583 | def output(self): |
no test coverage detected