From 7b40ed9bea9b7a05f058a9701b70204e6c2845fa Mon Sep 17 00:00:00 2001 From: Aidas Klimas Date: Mon, 27 Aug 2018 11:47:49 +0300 Subject: [PATCH] Update base_options.py Files are stored as "net_epoch_30_id_D.pth", number is a third argument --- options/base_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/base_options.py b/options/base_options.py index ed939f796..a785e3530 100644 --- a/options/base_options.py +++ b/options/base_options.py @@ -70,7 +70,7 @@ def _set_and_check_load_epoch(self): found = False for file in os.listdir(models_dir): if file.startswith("net_epoch_"): - found = int(file.split('_')[1]) == self._opt.load_epoch + found = int(file.split('_')[2]) == self._opt.load_epoch if found: break assert found, 'Model for epoch %i not found' % self._opt.load_epoch else: