tf.estimator.SessionRunContext
Provides information about the session.run()
call being made.
tf.estimator.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 MonitoredSession.run(fetches=a, feed_dict=b) , then this
field is equal to SessionRunArgs(a, b).
|
session
|
A TensorFlow session object which will execute the run .
|
stop_requested
|
Returns whether a stop is requested or not.
If true, MonitoredSession stops iterations.
Returns:
A bool
|
Methods
request_stop
View source
request_stop()
Sets stop requested field.
Hooks can use this function to request stop of iterations.
MonitoredSession
checks whether this is called or not.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2022-11-04 UTC.
[null,null,["Last updated 2022-11-04 UTC."],[],[]]