Skip to content

Commit

Permalink
Handling the case when save_summaries_secs or save_checkpoint_secs is…
Browse files Browse the repository at this point in the history
… None.

Change: 143710810
  • Loading branch information
rohan100jain authored and tensorflower-gardener committed Jan 5, 2017
1 parent aab0997 commit 4174372
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow/python/training/monitored_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@ def MonitoredTrainingSession(master='', # pylint: disable=invalid-name
all_hooks.append(
basic_session_run_hooks.StepCounterHook(output_dir=checkpoint_dir))

if save_summaries_steps > 0:
if save_summaries_steps and save_summaries_steps > 0:
all_hooks.append(basic_session_run_hooks.SummarySaverHook(
scaffold=scaffold,
save_steps=save_summaries_steps,
output_dir=checkpoint_dir))
if save_checkpoint_secs > 0:
if save_checkpoint_secs and save_checkpoint_secs > 0:
all_hooks.append(basic_session_run_hooks.CheckpointSaverHook(
checkpoint_dir, save_secs=save_checkpoint_secs, scaffold=scaffold))

Expand Down

0 comments on commit 4174372

Please sign in to comment.