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

Function get_default_graph

tensorflow/python/framework/ops.py:5939–5954  ·  view source on GitHub ↗

Returns the default graph for the current thread. The returned graph will be the innermost graph on which a `Graph.as_default()` context has been entered, or a global default graph if none has been explicitly created. NOTE: The default graph is a property of the current thread. If you cr

()

Source from the content-addressed store, hash-verified

5937
5938@tf_export(v1=["get_default_graph"])
5939def get_default_graph():
5940 """Returns the default graph for the current thread.
5941
5942 The returned graph will be the innermost graph on which a
5943 `Graph.as_default()` context has been entered, or a global default
5944 graph if none has been explicitly created.
5945
5946 NOTE: The default graph is a property of the current thread. If you
5947 create a new thread, and wish to use the default graph in that
5948 thread, you must explicitly add a `with g.as_default():` in that
5949 thread's function.
5950
5951 Returns:
5952 The default `Graph` being used in the current thread.
5953 """
5954 return _default_graph_stack.get_default()
5955
5956
5957def has_default_graph():

Callers 15

combinedFunction · 0.85
deviceFunction · 0.85
streamFunction · 0.85
containerFunction · 0.85
control_dependenciesFunction · 0.85
init_scopeFunction · 0.85
inside_functionFunction · 0.85
get_name_scopeFunction · 0.85
_get_graph_from_inputsFunction · 0.85

Calls 1

get_defaultMethod · 0.45

Tested by

no test coverage detected