MCPcopy
hub / github.com/ibab/tensorflow-wavenet / load

Function load

train.py:122–139  ·  view source on GitHub ↗
(saver, sess, logdir)

Source from the content-addressed store, hash-verified

120
121
122def load(saver, sess, logdir):
123 print("Trying to restore saved checkpoints from {} ...".format(logdir),
124 end="")
125
126 ckpt = tf.train.get_checkpoint_state(logdir)
127 if ckpt:
128 print(" Checkpoint found: {}".format(ckpt.model_checkpoint_path))
129 global_step = int(ckpt.model_checkpoint_path
130 .split('/')[-1]
131 .split('-')[-1])
132 print(" Global step was: {}".format(global_step))
133 print(" Restoring...", end="")
134 saver.restore(sess, ckpt.model_checkpoint_path)
135 print(" Done.")
136 return global_step
137 else:
138 print(" No checkpoint found.")
139 return None
140
141
142def get_default_logdir(logdir_root):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected