From d34291733bb67679a35a33ff97449ac35a2f2e6b Mon Sep 17 00:00:00 2001 From: Alex Stoken Date: Wed, 17 Jun 2020 10:26:55 -0500 Subject: [PATCH] Fix get_latest_run() to search inside 'weights' subfolders --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 56fb66b..4570cd0 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -39,7 +39,7 @@ def init_seeds(seed=0): def get_latest_run(search_dir = './runs/'): # get path to most recent 'last.pt' in run dirs # 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) return latest