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

Function _deserialize_keras_tensor

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

Deserializes a single Keras Tensor passed to `call`.

(t)

Source from the content-addressed store, hash-verified

1880 """Deserializes Keras Tensors passed to `call`.."""
1881
1882 def _deserialize_keras_tensor(t):
1883 """Deserializes a single Keras Tensor passed to `call`."""
1884 if isinstance(t, tf_utils.ListWrapper):
1885 t = t.as_list()
1886 layer_name = t[0]
1887 node_index = t[1]
1888 tensor_index = t[2]
1889
1890 layer = layer_map[layer_name]
1891 node = layer._inbound_nodes[node_index]
1892 return nest.flatten(node.output_tensors)[tensor_index]
1893 return t
1894
1895 kwargs = tf_utils.convert_inner_node_data(kwargs, wrap=True)
1896 return nest.map_structure(_deserialize_keras_tensor, kwargs)

Callers

nothing calls this directly

Calls 2

as_listMethod · 0.45
flattenMethod · 0.45

Tested by

no test coverage detected