Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot load the latest training model when restart the training progress #4

Open
alalan opened this issue Dec 8, 2021 · 1 comment

Comments

@alalan
Copy link

alalan commented Dec 8, 2021

It seems 'glob.glob()' will not fetch the sorted list ,
this following code cannot load the latest training model . At least it occurred in my laptop.

checkpoint = torch.load(glob.glob(os.path.join(ckpt_folder, '*.pt'))[-1])

I have to sort the list explicitly, so I changed it to this

checkpoint = torch.load(sorted(glob.glob(os.path.join(ckpt_folder, '*.pt')))[-1])

FYI

@jiupinjia
Copy link
Owner

@alalan, thank you for your feedback. In this link you may have the solution. I will fix it in my next update. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants