tf.compat.v1.train.MonitoredSession.StepContext
Stay organized with collections
Save and categorize content based on your preferences.
Control flow instrument for the step_fn
from run_step_fn()
.
tf.compat.v1.train.MonitoredSession.StepContext(
session, run_with_hooks_fn
)
Users of step_fn
may perform run()
calls without running hooks
by accessing the session
. A run()
call with hooks may be performed
using run_with_hooks()
. Computation flow can be interrupted using
request_stop()
.
Args |
session
|
An instance of tf.compat.v1.Session .
|
run_with_hooks_fn
|
A function for running fetches and hooks.
|
Methods
request_stop
View source
request_stop()
Exit the training loop by causing should_stop()
to return True
.
Causes step_fn
to exit by raising an exception.
run_with_hooks
View source
run_with_hooks(
*args, **kwargs
)
Same as MonitoredSession.run
. Accepts the same arguments.
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 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]