Commit
·
256a3e8
1
Parent(s):
d994ed2
small dataset bug fix #140
Browse files
train.py
CHANGED
@@ -287,10 +287,10 @@ def train(hyp):
|
|
287 |
|
288 |
# Plot
|
289 |
if ni < 3:
|
290 |
-
f = 'train_batch%g.jpg' %
|
291 |
-
|
292 |
-
if tb_writer:
|
293 |
-
tb_writer.add_image(f,
|
294 |
# tb_writer.add_graph(model, imgs) # add model to tensorboard
|
295 |
|
296 |
# end batch ------------------------------------------------------------------------------------------------
|
|
|
287 |
|
288 |
# Plot
|
289 |
if ni < 3:
|
290 |
+
f = 'train_batch%g.jpg' % ni # filename
|
291 |
+
result = plot_images(images=imgs, targets=targets, paths=paths, fname=f)
|
292 |
+
if tb_writer and result is not None:
|
293 |
+
tb_writer.add_image(f, result, dataformats='HWC', global_step=epoch)
|
294 |
# tb_writer.add_graph(model, imgs) # add model to tensorboard
|
295 |
|
296 |
# end batch ------------------------------------------------------------------------------------------------
|