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

Function _handle_graph

tensorflow/python/ops/resource_variable_ops.py:230–238  ·  view source on GitHub ↗
(handle)

Source from the content-addressed store, hash-verified

228
229@contextlib.contextmanager
230def _handle_graph(handle):
231 # Note: might have an eager tensor but not be executing eagerly when building
232 # functions.
233 if (context.executing_eagerly() or isinstance(handle, ops.EagerTensor)
234 or ops.has_default_graph()):
235 yield
236 else:
237 with handle.graph.as_default():
238 yield
239
240
241class EagerResourceDeleter(object):

Callers 5

assign_subMethod · 0.70
assign_addMethod · 0.70
assignMethod · 0.70
_strided_slice_assignMethod · 0.70

Calls 2

executing_eagerlyMethod · 0.80
as_defaultMethod · 0.45

Tested by

no test coverage detected