tensorboard notice and model verbose option

This commit is contained in:
Glenn Jocher 2020-04-05 13:35:58 -07:00
parent a19b1a3b94
commit e81a152a92
2 changed files with 3 additions and 2 deletions

View File

@ -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:]

View File

@ -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