aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/training/monitored_session.py
diff options
context:
space:
mode:
authorGravatar Igor Saprykin <isaprykin@google.com>2017-11-08 14:39:42 -0800
committerGravatar Andrew Selle <aselle@andyselle.com>2017-11-10 16:14:37 -0800
commit9e0e6ff16b0cb5764416297cf3797ff7521fd73a (patch)
tree8068187f733fc976837abae61f0db0baf5d23bac /tensorflow/python/training/monitored_session.py
parentbf05a2eef97863fc78778bcde5987f93af8a7598 (diff)
Fix tensorflow.org rendering of the example code for run_step_fn.
Python code isn't indented correctly. PiperOrigin-RevId: 175067065
Diffstat (limited to 'tensorflow/python/training/monitored_session.py')
-rw-r--r--tensorflow/python/training/monitored_session.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/python/training/monitored_session.py b/tensorflow/python/training/monitored_session.py
index af9f11bb07..1f6016a91b 100644
--- a/tensorflow/python/training/monitored_session.py
+++ b/tensorflow/python/training/monitored_session.py
@@ -536,6 +536,7 @@ class _MonitoredSession(object):
will return True.
Example usage:
+
```python
with tf.Graph().as_default():
c = tf.placeholder(dtypes.float32)
@@ -552,6 +553,7 @@ class _MonitoredSession(object):
while not session.should_stop():
a = session.run_step_fn(step_fn)
```
+
Hooks interact with the `run_with_hooks()` call inside the `step_fn`
as they do with a `MonitoredSession.run` call.