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

Class KerasHistory

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

Tracks the Layer call that created a Tensor, for Keras Graph Networks. During construction of Keras Graph Networks, this metadata is added to each Tensor produced as the output of a Layer, starting with an `InputLayer`. This allows Keras to track how each Tensor was produced, and this infor

Source from the content-addressed store, hash-verified

2699
2700
2701class KerasHistory(
2702 collections.namedtuple('KerasHistory',
2703 ['layer', 'node_index', 'tensor_index'])):
2704 """Tracks the Layer call that created a Tensor, for Keras Graph Networks.
2705
2706 During construction of Keras Graph Networks, this metadata is added to
2707 each Tensor produced as the output of a Layer, starting with an
2708 `InputLayer`. This allows Keras to track how each Tensor was produced, and
2709 this information is later retraced by the `keras.engine.Network` class to
2710 reconstruct the Keras Graph Network.
2711
2712 Attributes:
2713 layer: The Layer that produced the Tensor.
2714 node_index: The specific call to the Layer that produced this Tensor. Layers
2715 can be called multiple times in order to share weights. A new node is
2716 created every time a Tensor is called.
2717 tensor_index: The output index for this Tensor. Always zero if the Layer
2718 that produced this Tensor only has one output. Nested structures of
2719 Tensors are deterministically assigned an index via `nest.flatten`.
2720 """
2721 # Added to maintain memory and performance characteristics of `namedtuple`
2722 # while subclassing.
2723 __slots__ = ()
2724
2725
2726# Avoid breaking users who directly import this symbol from this file.

Callers 1

_add_inbound_nodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected