Fix sanity errors.
This commit is contained in:
parent
fe5d8a5cad
commit
8cc20365f7
@ -1276,11 +1276,12 @@ class Saver(object):
|
|||||||
if save_path is None:
|
if save_path is None:
|
||||||
raise ValueError("Can't load save_path when it is None.")
|
raise ValueError("Can't load save_path when it is None.")
|
||||||
|
|
||||||
if not checkpoint_management.checkpoint_exists_internal(compat.as_text(save_path)):
|
checkpoint_prefix = compat.as_text(save_path)
|
||||||
|
if not checkpoint_management.checkpoint_exists_internal(checkpoint_prefix):
|
||||||
raise ValueError("The passed save_path is not a valid checkpoint: " +
|
raise ValueError("The passed save_path is not a valid checkpoint: " +
|
||||||
compat.as_text(save_path))
|
checkpoint_prefix)
|
||||||
|
|
||||||
logging.info("Restoring parameters from %s", compat.as_text(save_path))
|
logging.info("Restoring parameters from %s", checkpoint_prefix)
|
||||||
try:
|
try:
|
||||||
if context.executing_eagerly():
|
if context.executing_eagerly():
|
||||||
self._build_eager(save_path, build_save=False, build_restore=True)
|
self._build_eager(save_path, build_save=False, build_restore=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user