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
()
| 5937 | |
| 5938 | @tf_export(v1=["get_default_graph"]) |
| 5939 | def 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 | |
| 5957 | def has_default_graph(): |
no test coverage detected