[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tf.compat.v1.get_default_session\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/framework/stack.py#L118-L133) |\n\nReturns the default session for the current thread. \n\n tf.compat.v1.get_default_session()\n\nThe returned `Session` will be the innermost session on which a\n`Session` or `Session.as_default()` context has been entered.\n| **Note:** The default session is a property of the current thread. If you create a new thread, and wish to use the default session in that thread, you must explicitly add a `with sess.as_default():` in that thread's function.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| The default `Session` being used in the current thread. ||\n\n\u003cbr /\u003e"]]