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

Function get_default_session

tensorflow/python/framework/ops.py:5433–5447  ·  view source on GitHub ↗

Returns the default session for the current thread. The returned `Session` will be the innermost session on which a `Session` or `Session.as_default()` context has been entered. NOTE: The default session is a property of the current thread. If you create a new thread, and wish to use the d

()

Source from the content-addressed store, hash-verified

5431
5432@tf_export(v1=["get_default_session"])
5433def get_default_session():
5434 """Returns the default session for the current thread.
5435
5436 The returned `Session` will be the innermost session on which a
5437 `Session` or `Session.as_default()` context has been entered.
5438
5439 NOTE: The default session is a property of the current thread. If you
5440 create a new thread, and wish to use the default session in that
5441 thread, you must explicitly add a `with sess.as_default():` in that
5442 thread's function.
5443
5444 Returns:
5445 The default `Session` being used in the current thread.
5446 """
5447 return _default_session_stack.get_default()
5448
5449
5450def _eval_using_default_session(tensors, feed_dict, graph, session=None):

Callers 2

Calls 1

get_defaultMethod · 0.45

Tested by

no test coverage detected