This commit is contained in:
Glenn Jocher 2020-02-26 13:42:50 -08:00
parent 2baa67cde2
commit 7d7c22cb7e
1 changed files with 4 additions and 4 deletions

View File

@ -254,11 +254,11 @@ def train():
# x['weight_decay'] = hyp['weight_decay'] * g
# Plot images with bounding boxes
if ni == 0:
fname = 'train_batch%g.png' % i
plot_images(imgs=imgs, targets=targets, paths=paths, fname=fname)
if ni < 1:
f = 'train_batch%g.png' % i # filename
plot_images(imgs=imgs, targets=targets, paths=paths, fname=f)
if tb_writer:
tb_writer.add_image(fname, cv2.imread(fname)[:, :, ::-1], dataformats='HWC')
tb_writer.add_image(f, cv2.imread(f)[:, :, ::-1], dataformats='HWC')
# Multi-Scale training
if opt.multi_scale: