class_docstr: Gathers and serializes an object graph.
class_docstr_tok: ["Gathers","and","serializes","an","object","graph","."]
docstr: Configure the graph view.
  
  Args:
    root: A `Trackable` object whose variables (including the variables of
      dependencies, recursively) should be saved. May be a weak reference.
    attached_dependencies: List of dependencies to attach to the root object.
      Used when saving a Checkpoint with a defined root object. To avoid
      reference cycles, this should use the WeakTrackableReference class.
docstr_tok: ["Configure","the","graph","view",".","Args",":","root",":","A","`","Trackable","`","object","whose","variables","(","including","the","variables","of","dependencies",",","recursively",")","should","be","saved",".","May","be","a","weak","reference",".","attached_dependencies",":","List","of","dependencies","to","attach","to","the","root","object",".","Used","when","saving","a","Checkpoint","with","a","defined","root","object",".","To","avoid","reference","cycles",",","this","should","use","the","WeakTrackableReference","class","."]
code: def __init__(self, root, attached_dependencies=None):
      """Configure the graph view.
  
      Args:
        root: A `Trackable` object whose variables (including the variables of
          dependencies, recursively) should be saved. May be a weak reference.
        attached_dependencies: List of dependencies to attach to the root object.
          Used when saving a Checkpoint with a defined root object. To avoid
          reference cycles, this should use the WeakTrackableReference class.
      """
      trackable_view.TrackableView.__init__(self, root)
      # ObjectGraphView should never contain a strong reference to root, since it
      # may result in a cycle:
      #   root -> deferred dependencies -> CheckpointPosition
      #   -> CheckpointRestoreCoordinator -> ObjectGraphView -> root
      self._root_ref = (
          root if isinstance(root, weakref.ref) else weakref.ref(root)
      )
      self._attached_dependencies = attached_dependencies
  
file_path: tensorflow/tensorflow/python/checkpoint/graph_view.py
imports: import copy
  import weakref
  from tensorflow.python.checkpoint import save_util_v1
  from tensorflow.python.checkpoint import trackable_view
  from tensorflow.python.trackable import base
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new ObjectGraphView object from inherited base classes: trackable_view with example: obj = ObjectGraphView(root, attached_dependencies)