Commit 9b6aa824 authored by Lei Yang's avatar Lei Yang Committed by Francisco Massa

Update checkpoint.py (#299)

* Update checkpoint.py

if edit "{save_dir}/last_checkpoint" by vim, "\n" will auto append to the end of file. which will raise 

```
FileNotFoundError: [Errno 2] No such file or directory: 'save_dir/model_0060000.pth\n'
```

* Update checkpoint.py

if edit "{save_dir}/last_checkpoint" by vim, "\n" will auto append to the end of file. which will raise
```
FileNotFoundError: [Errno 2] No such file or directory: 'save_dir/model_0060000.pth\n'
```
parent f66c1d40
......@@ -79,6 +79,7 @@ class Checkpointer(object):
try:
with open(save_file, "r") as f:
last_saved = f.read()
last_saved = last_saved.strip()
except IOError:
# if file doesn't exist, maybe because it has just been
# deleted by a separate process
......
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