From 2e3b6bad77f7a169694ac24adf540381b0053131 Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 18 Jun 2020 11:33:02 -0600 Subject: [PATCH] Log tensorboard directly into experiments directory --- codes/train.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/codes/train.py b/codes/train.py index 93d3c1dc..13e5d4d4 100644 --- a/codes/train.py +++ b/codes/train.py @@ -92,13 +92,7 @@ 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 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) - + tb_logger_path = os.path.join(opt['path']['experiments_root'], 'tb_logger') version = float(torch.__version__[0:3]) if version >= 1.1: # PyTorch 1.1 from torch.utils.tensorboard import SummaryWriter