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

Method __init__

tensorflow/contrib/graph_editor/util.py:341–358  ·  view source on GitHub ↗

Create a dictionary of control-output dependencies. Args: graph: a `tf.Graph`. Returns: A dictionary where a key is a `tf.Operation` instance and the corresponding value is a list of all the ops which have the key as one of their control-input dependencies.

(self, graph)

Source from the content-addressed store, hash-verified

339 """The control outputs topology."""
340
341 def __init__(self, graph):
342 """Create a dictionary of control-output dependencies.
343
344 Args:
345 graph: a `tf.Graph`.
346 Returns:
347 A dictionary where a key is a `tf.Operation` instance and the
348 corresponding value is a list of all the ops which have the key
349 as one of their control-input dependencies.
350 Raises:
351 TypeError: graph is not a `tf.Graph`.
352 """
353 if not isinstance(graph, tf_ops.Graph):
354 raise TypeError("Expected a tf.Graph, got: {}".format(type(graph)))
355 self._control_outputs = {}
356 self._graph = graph
357 self._version = None
358 self._build()
359
360 def update(self):
361 """Update the control outputs if the graph has changed."""

Callers

nothing calls this directly

Calls 3

_buildMethod · 0.95
typeFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected