TensorBoard add_graph() fix (#3236)
This commit is contained in:
1 parent
3f74cd9ed1
commit
b7cd1f540d
1 file changed
+3
-3
@@ -330,9 +330,9 @@ def train(hyp, opt, device, tb_writer=None):
|
||||
if plots and ni < 3:
|
||||
f = save_dir / f'train_batch{ni}.jpg' # filename
|
||||
Thread(target=plot_images, args=(imgs, targets, paths, f), daemon=True).start()
|
||||
# if tb_writer:
|
||||
# tb_writer.add_image(f, result, dataformats='HWC', global_step=epoch)
|
||||
# tb_writer.add_graph(torch.jit.trace(model, imgs, strict=False), []) # add model graph
|
||||
if tb_writer:
|
||||
tb_writer.add_graph(torch.jit.trace(model, imgs, strict=False), []) # add model graph
|
||||
# tb_writer.add_image(f, result, dataformats='HWC', global_step=epoch)
|
||||
elif plots and ni == 10 and wandb_logger.wandb:
|
||||
wandb_logger.log({"Mosaics": [wandb_logger.wandb.Image(str(x), caption=x.name) for x in
|
||||
save_dir.glob('train*.jpg') if x.exists()]})
|
||||
|
||||
Reference in new issue
Block a user