class_docstr: Container for managing attribute cache state within a Layer.
  
  The cache can be invalidated either on an individual basis (for instance when
  an attribute is mutated) or a layer-wide basis (such as when a new dependency
  is added).
class_docstr_tok: ["Container","for","managing","attribute","cache","state","within","a","Layer",".","The","cache","can","be","invalidated","either","on","an","individual","basis","(","for","instance","when","an","attribute","is","mutated",")","or","a","layer-wide","basis","(","such","as","when","a","new","dependency","is","added",")","."]
code: def __init__(self, always_propagate=False):
      self._parents = weakref.WeakSet()
      self.attributes = collections.defaultdict(MutationSentinel)
  
      # The trackable data structure containers are simple pass throughs. They
      # don't know or care about particular attributes. As a result, they will
      # consider themselves to be in a cached state, so it's up to the Layer
      # which contains them to terminate propagation.
      self.always_propagate = always_propagate
  
file_path: tensorflow/tensorflow/python/trackable/layer_utils.py
imports: import collections
  import weakref
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 1 to create a new AttributeSentinel object from inherited base classes: object with example: obj = AttributeSentinel(always_propagate)