Skip to content

Commit

Permalink
Explicit model load warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfrancesco committed May 19, 2020
1 parent dea2250 commit 4e898a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ def load_model(self, checkpoint_path: str = None, verbose=True):
if verbose:
print(f'restored weights from {checkpoint_path} at step {model.step}')
else:
if manager.latest_checkpoint is None:
print(f'WARNING: could not find weights file. Trying to load from \n {self.weights_dir}.')
print('Edit data_config.yaml to point at the right log directory.')
ckpt.restore(manager.latest_checkpoint)
if verbose:
print(f'restored weights from {manager.latest_checkpoint} at step {model.step}')
Expand Down

0 comments on commit 4e898a5

Please sign in to comment.