This commit is contained in:
Eren Gölge
2021-03-08 02:59:48 +01:00
committed by Eren Gölge
parent 628afe5cb0
commit e03a426378
+1 -1
View File
@@ -94,7 +94,7 @@ def get_last_checkpoint(path):
match = re.search(f"{key}_([0-9]+)", file_name)
if match is not None:
model_num = int(match.groups()[0])
if model_num > last_model_num or last_model_num is None:
if last_model_num is None or model_num > last_model_num:
last_model_num = model_num
last_model = file_name