From 05ae6e84993448bd5c65109440185d5a1ad63a29 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 6 Apr 2020 15:45:18 -0700 Subject: [PATCH] tensorboard/focal loss reporting update --- train.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/train.py b/train.py index 9198f623..929420ea 100644 --- a/train.py +++ b/train.py @@ -48,6 +48,10 @@ if f: for k, v in zip(hyp.keys(), np.loadtxt(f[0])): hyp[k] = v +# Print focal loss if gamma > 0 +if hyp['fl_gamma']: + print('Using FocalLoss(gamma=%g)' % hyp['fl_gamma']) + def train(): cfg = opt.cfg @@ -412,7 +416,7 @@ if __name__ == '__main__': from torch.utils.tensorboard import SummaryWriter tb_writer = SummaryWriter() - print('Tensorboard started at http://localhost:6006/') + print("Tensorboard found. Run 'tensorboard --logdir=runs' to view at http://localhost:6006/") except: pass