Unverified 提交 602d7ffb authored 作者: Rüdiger Busche's avatar Rüdiger Busche 提交者: GitHub

Check TensorBoard logger before adding graph (#8664)

Otherwise, an error is thrown if the tensorboard logger is not included.
上级 92e47b85
......@@ -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), [])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论