cannot load the latest training model when restart the training progress
Opened this issue · 1 comments
alalan commented
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