Check TensorBoard logger before adding graph (#8664)
Otherwise, an error is thrown if the tensorboard logger is not included.pull/8668/head
parent
92e47b85d9
commit
602d7ffb0e
|
@ -102,7 +102,7 @@ class Loggers():
|
|||
# Callback runs on train batch end
|
||||
if plots:
|
||||
if ni == 0:
|
||||
if not self.opt.sync_bn: # --sync known issue https://github.com/ultralytics/yolov5/issues/3754
|
||||
if self.tb and not self.opt.sync_bn: # --sync known issue https://github.com/ultralytics/yolov5/issues/3754
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore') # suppress jit trace warning
|
||||
self.tb.add_graph(torch.jit.trace(de_parallel(model), imgs[0:1], strict=False), [])
|
||||
|
|
Loading…
Reference in New Issue