Spelling (#16547)
This commit is contained in:
parent
1aa6e1a67a
commit
70d608a5bd
@ -331,7 +331,7 @@ class CheckpointSaverListener(object):
|
|||||||
`CheckpointSaverHook`, as in this example:
|
`CheckpointSaverHook`, as in this example:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
class ExampleCheckpointSaverListerner(CheckpointSaverListener):
|
class ExampleCheckpointSaverListener(CheckpointSaverListener):
|
||||||
def begin(self):
|
def begin(self):
|
||||||
# You can add ops to the graph here.
|
# You can add ops to the graph here.
|
||||||
print('Starting the session.')
|
print('Starting the session.')
|
||||||
@ -347,7 +347,7 @@ class CheckpointSaverListener(object):
|
|||||||
print('Done with the session.')
|
print('Done with the session.')
|
||||||
|
|
||||||
...
|
...
|
||||||
listener = ExampleCheckpointSaverListerner()
|
listener = ExampleCheckpointSaverListener()
|
||||||
saver_hook = tf.train.CheckpointSaverHook(
|
saver_hook = tf.train.CheckpointSaverHook(
|
||||||
checkpoint_dir, listeners=[listener])
|
checkpoint_dir, listeners=[listener])
|
||||||
with tf.train.MonitoredTrainingSession(chief_only_hooks=[saver_hook]):
|
with tf.train.MonitoredTrainingSession(chief_only_hooks=[saver_hook]):
|
||||||
|
Loading…
Reference in New Issue
Block a user