1. fix ExperimentBase, create ouput folder with parent,

2. fix stop condition
This commit is contained in:
chenfeiyu 2020-12-11 11:58:57 +08:00
parent 07ce84c680
commit cecc8735c4
1 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ class ExperimentBase(object):
def train(self): def train(self):
self.new_epoch() self.new_epoch()
while self.iteration <= self.config.training.max_iteration: while self.iteration < self.config.training.max_iteration:
self.iteration += 1 self.iteration += 1
self.train_batch() self.train_batch()
@ -131,7 +131,7 @@ class ExperimentBase(object):
def setup_output_dir(self): def setup_output_dir(self):
# output dir # output dir
output_dir = Path(self.args.output).expanduser() output_dir = Path(self.args.output).expanduser()
output_dir.mkdir(exist_ok=True) output_dir.mkdir(parents=True, exist_ok=True)
self.output_dir = output_dir self.output_dir = output_dir