提交 d3429173 authored 作者: Alex Stoken's avatar Alex Stoken

Fix get_latest_run() to search inside 'weights' subfolders

上级 5f2eeba2
...@@ -39,7 +39,7 @@ def init_seeds(seed=0): ...@@ -39,7 +39,7 @@ def init_seeds(seed=0):
def get_latest_run(search_dir = './runs/'): def get_latest_run(search_dir = './runs/'):
# get path to most recent 'last.pt' in run dirs # get path to most recent 'last.pt' in run dirs
# assumes most recently saved 'last.pt' is the desired weights to --resume from # assumes most recently saved 'last.pt' is the desired weights to --resume from
last_list = glob.glob('runs/*/last.pt') last_list = glob.glob('runs/*/weights/last.pt')
latest = max(last_list, key = os.path.getctime) latest = max(last_list, key = os.path.getctime)
return latest return latest
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论