Unverified Commit d9f6b6f3 authored by Manoj Plakal's avatar Manoj Plakal Committed by GitHub
Browse files

Explicitly specify checkpoint version.


TF Saver now requires specifying the checkpoint version even when restoring to avoid errors when we specify
a path to a checkpoint file instead of a directory.
parent a7c84b82
...@@ -124,5 +124,6 @@ def load_vggish_slim_checkpoint(session, checkpoint_path): ...@@ -124,5 +124,6 @@ def load_vggish_slim_checkpoint(session, checkpoint_path):
vggish_vars = [v for v in tf.global_variables() if v.name in vggish_var_names] vggish_vars = [v for v in tf.global_variables() if v.name in vggish_var_names]
# Use a Saver to restore just the variables selected above. # Use a Saver to restore just the variables selected above.
saver = tf.train.Saver(vggish_vars, name='vggish_load_pretrained') saver = tf.train.Saver(vggish_vars, name='vggish_load_pretrained',
write_version=1)
saver.restore(session, checkpoint_path) saver.restore(session, checkpoint_path)
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