MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / input

Method input

tensorflow/python/keras/engine/base_layer.py:1564–1580  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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):

Callers 4

test_ops.ccFile · 0.45
ComputeMethod · 0.45
_signal_handlerFunction · 0.45

Calls 1

Tested by

no test coverage detected