Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #148 from NKPmedia/return_path_not_filename
Browse files Browse the repository at this point in the history
Return path not filename
  • Loading branch information
justusschock committed Jun 17, 2019
2 parents 6feb661 + 3de40fc commit b6396a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions delira/training/base_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,10 @@ def _search_for_prev_state(path, extensions=None):
int(x.rsplit("_", 1)[-1].rsplit(".", 1)[0])
for x in files])

latest_state_path = [x for x in files
latest_state_filename = [x for x in files
if x.startswith("checkpoint_epoch_%d"
% latest_epoch)][0]

latest_state_path = os.path.join(path, latest_state_filename)
return latest_state_path, latest_epoch

return None, 1

0 comments on commit b6396a8

Please sign in to comment.