From e81a152a9206f29c514ed8346b69b96a5a96d74f Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 5 Apr 2020 13:35:58 -0700 Subject: [PATCH] tensorboard notice and model verbose option --- models.py | 4 ++-- train.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index fdde9dd7..f67b4b54 100755 --- a/models.py +++ b/models.py @@ -213,7 +213,7 @@ class YOLOLayer(nn.Module): class Darknet(nn.Module): # YOLOv3 object detection model - def __init__(self, cfg, img_size=(416, 416)): + def __init__(self, cfg, img_size=(416, 416), verbose=False): super(Darknet, self).__init__() self.module_defs = parse_model_cfg(cfg) @@ -223,7 +223,7 @@ class Darknet(nn.Module): # Darknet Header https://github.com/AlexeyAB/darknet/issues/2914#issuecomment-496675346 self.version = np.array([0, 2, 5], dtype=np.int32) # (int32) version info: major, minor, revision self.seen = np.array([0], dtype=np.int64) # (int64) number of images seen during training - self.info() # print model description + self.info(verbose) # print model description def forward(self, x, verbose=False): img_size = x.shape[-2:] diff --git a/train.py b/train.py index 6a8bd176..802997ac 100644 --- a/train.py +++ b/train.py @@ -411,6 +411,7 @@ if __name__ == '__main__': from torch.utils.tensorboard import SummaryWriter tb_writer = SummaryWriter() + print('Tensorboard started at http://localhost:6006/') except: pass