pretty logger

This commit is contained in:
leo 2019-12-06 10:44:20 +08:00
parent fd7564c296
commit 54f4d38148
1 changed files with 1 additions and 2 deletions

View File

@ -23,6 +23,7 @@ def main(cfg):
cwd = utils.get_original_cwd() cwd = utils.get_original_cwd()
cfg.cwd = cwd cfg.cwd = cwd
cfg.pos_size = 2 * cfg.pos_limit + 2 cfg.pos_size = 2 * cfg.pos_limit + 2
logger.info(f'\n{cfg.pretty()}')
__Model__ = { __Model__ = {
'cnn': models.PCNN, 'cnn': models.PCNN,
@ -66,8 +67,6 @@ def main(cfg):
model = __Model__[cfg.model_name](cfg) model = __Model__[cfg.model_name](cfg)
model.to(device) model.to(device)
logger.info(f'\n{cfg.pretty()}')
logger.info(f'\n {model}') logger.info(f'\n {model}')
optimizer = optim.Adam(model.parameters(), lr=cfg.learning_rate, weight_decay=cfg.weight_decay) optimizer = optim.Adam(model.parameters(), lr=cfg.learning_rate, weight_decay=cfg.weight_decay)