Provides information about the session.run()
call being made.
tf.train.SessionRunContext( original_args, session )
Provides information about original request to Session.Run()
function. SessionRunHook objects can stop the loop by calling request_stop()
of run_context
. In the future we may use this object to add more information about run without changing the Hook API.
Attributes | |
---|---|
original_args | A SessionRunArgs object holding the original arguments of run() . If user called |
session | A TensorFlow session object which will execute the run . |
stop_requested | Returns whether a stop is requested or not. If true, |
request_stop
request_stop()
Sets stop requested field.
Hooks can use this function to request stop of iterations. MonitoredSession
checks whether this is called or not.
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/train/SessionRunContext