mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
small dataset bug fix #140
This commit is contained in:
parent
d994ed25f1
commit
256a3e89d2
8
train.py
8
train.py
@ -287,10 +287,10 @@ def train(hyp):
|
|||||||
|
|
||||||
# Plot
|
# Plot
|
||||||
if ni < 3:
|
if ni < 3:
|
||||||
f = 'train_batch%g.jpg' % i # filename
|
f = 'train_batch%g.jpg' % ni # filename
|
||||||
res = plot_images(images=imgs, targets=targets, paths=paths, fname=f)
|
result = plot_images(images=imgs, targets=targets, paths=paths, fname=f)
|
||||||
if tb_writer:
|
if tb_writer and result is not None:
|
||||||
tb_writer.add_image(f, res, dataformats='HWC', global_step=epoch)
|
tb_writer.add_image(f, result, dataformats='HWC', global_step=epoch)
|
||||||
# tb_writer.add_graph(model, imgs) # add model to tensorboard
|
# tb_writer.add_graph(model, imgs) # add model to tensorboard
|
||||||
|
|
||||||
# end batch ------------------------------------------------------------------------------------------------
|
# end batch ------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user