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

Function _map_subgraph_network

tensorflow/python/keras/engine/network.py:1837–1850  ·  view source on GitHub ↗

Returns the nodes and layers in the topology from `inputs` to `outputs`. Args: inputs: List of input tensors. outputs: List of output tensors. Returns: A tuple of List{Node] and List[Layer].

(inputs, outputs)

Source from the content-addressed store, hash-verified

1835
1836
1837def _map_subgraph_network(inputs, outputs):
1838 """Returns the nodes and layers in the topology from `inputs` to `outputs`.
1839
1840 Args:
1841 inputs: List of input tensors.
1842 outputs: List of output tensors.
1843
1844 Returns:
1845 A tuple of List{Node] and List[Layer].
1846 """
1847 base_layer_utils.create_keras_history(outputs)
1848 # Keep only nodes and layers in the topology betweeen inputs and outputs.
1849 _, nodes_by_depth, layers, _ = _map_graph_network(inputs, outputs)
1850 return nest.flatten([nodes for nodes in nodes_by_depth.values()]), layers
1851
1852
1853def _should_skip_first_node(layer):

Callers 2

Calls 3

_map_graph_networkFunction · 0.85
flattenMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected