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: