Skip to content
Snippets Groups Projects
Commit 80cab7e6 authored by Neta Zmora's avatar Neta Zmora
Browse files

enable load_checkpoint when chkpt_file has an initial component of ~

Prevent exception when loading checkpoints from a home directory
parent cadd07eb
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,7 @@ def load_checkpoint(model, chkpt_file, optimizer=None,
# One of the values is missing so we can't perform the comparison
pass
chkpt_file = os.path.expanduser(chkpt_file)
if not os.path.isfile(chkpt_file):
raise IOError(ENOENT, 'Could not find a checkpoint file at', chkpt_file)
assert optimizer == None, "argument optimizer is deprecated and must be set to None"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment