ultralytics 8.0.48 Edge TPU fix and Metrics updates (#1171)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: majid nasiri <majnasai@gmail.com>
This commit is contained in:
parent
a58f766f94
commit
74e4c94806
23 changed files with 426 additions and 245 deletions
|
|
@ -1,8 +1,12 @@
|
|||
# Ultralytics YOLO 🚀, GPL-3.0 license
|
||||
from ultralytics.yolo.utils import LOGGER, TESTS_RUNNING
|
||||
|
||||
from torch.utils.tensorboard import SummaryWriter
|
||||
try:
|
||||
from torch.utils.tensorboard import SummaryWriter
|
||||
|
||||
from ultralytics.yolo.utils import LOGGER
|
||||
assert not TESTS_RUNNING # do not log pytest
|
||||
except (ImportError, AssertionError):
|
||||
SummaryWriter = None
|
||||
|
||||
writer = None # TensorBoard SummaryWriter instance
|
||||
|
||||
|
|
@ -18,7 +22,6 @@ def on_pretrain_routine_start(trainer):
|
|||
try:
|
||||
writer = SummaryWriter(str(trainer.save_dir))
|
||||
except Exception as e:
|
||||
writer = None # TensorBoard SummaryWriter instance
|
||||
LOGGER.warning(f'WARNING ⚠️ TensorBoard not initialized correctly, not logging this run. {e}')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue