Commit 3fc4ab95 authored by Ruoxin Sang's avatar Ruoxin Sang Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 321105003
parent ca919737
...@@ -151,8 +151,10 @@ class Controller(object): ...@@ -151,8 +151,10 @@ class Controller(object):
checkpoint_interval, steps_per_loop, interval_name="checkpoint") checkpoint_interval, steps_per_loop, interval_name="checkpoint")
model_restored = self.restore_checkpoint() model_restored = self.restore_checkpoint()
if not model_restored and checkpoint_interval: if not model_restored and (checkpoint_interval and
# If the model is not restored from a checkpoint, save an initial self.trainer is not None):
# If the model is not restored from a checkpoint, and
# `checkpoint_interval` is enabled for training, save an initial
# checkpoint. # checkpoint.
self.save_checkpoint() self.save_checkpoint()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment