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

Method add_to_graph

tensorflow/python/eager/function.py:455–465  ·  view source on GitHub ↗
(self, g=None)

Source from the content-addressed store, hash-verified

453 self._stateful_ops = tuple(op for op in operations if op._is_stateful) # pylint: disable=protected-access
454
455 def add_to_graph(self, g=None):
456 # pylint: disable=protected-access
457 if not g and context.executing_eagerly():
458 context.context().add_function_def(self.definition)
459 else:
460 if self.name not in g._functions:
461 g._add_function(self)
462 for f in self.graph._functions.values():
463 if f.name not in g._functions:
464 g._add_function(f)
465 # pylint: enable=protected-access
466
467 @property
468 def stateful_ops(self):

Callers

nothing calls this directly

Calls 5

executing_eagerlyMethod · 0.80
add_function_defMethod · 0.80
contextMethod · 0.45
_add_functionMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected