From 03258445bc3cecf7657409a1870ada5f526d998b Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 30 Apr 2020 12:35:51 -0600 Subject: [PATCH] tblogger.. --- codes/train.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codes/train.py b/codes/train.py index 02f8f2bb..fb9b4cfa 100644 --- a/codes/train.py +++ b/codes/train.py @@ -73,9 +73,10 @@ def main(): logger.info(option.dict2str(opt)) # tensorboard logger if opt['use_tb_logger'] and 'debug' not in opt['name']: + tb_logger_path = '../tb_logger/' + opt['name'] + # If not resuming, delete the existing logs. Tensorboard doesn't do too great with these. - if 'resume_state' not in opt['path'].keys(): - tb_logger_path = '../tb_logger/' + opt['name'] + if opt['path'].get('resume_state', None) is None: if os.path.exists(tb_logger_path) and os.path.isdir(tb_logger_path): shutil.rmtree(tb_logger_path)