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

Method get_controller

tensorflow/python/framework/ops.py:5553–5564  ·  view source on GitHub ↗
(self, default)

Source from the content-addressed store, hash-verified

5551
5552 @tf_contextlib.contextmanager
5553 def get_controller(self, default):
5554 context.context().context_switches.push(default.building_function,
5555 default.as_default,
5556 default._device_function_stack)
5557 try:
5558 with super(_DefaultGraphStack,
5559 self).get_controller(default) as g, context.graph_mode():
5560 yield g
5561 finally:
5562 # If an exception is raised here it may be hiding a related exception in
5563 # the try-block (just above).
5564 context.context().context_switches.pop()
5565
5566
5567_default_graph_stack = _DefaultGraphStack()

Callers

nothing calls this directly

Calls 4

pushMethod · 0.45
contextMethod · 0.45
get_controllerMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected