|
|
@ -4,7 +4,7 @@ import os
|
|
|
|
import pkg_resources as pkg
|
|
|
|
import pkg_resources as pkg
|
|
|
|
|
|
|
|
|
|
|
|
from ultralytics.yolo.utils import LOGGER, TESTS_RUNNING
|
|
|
|
from ultralytics.yolo.utils import LOGGER, TESTS_RUNNING
|
|
|
|
from ultralytics.yolo.utils.torch_utils import get_flops, get_num_params
|
|
|
|
from ultralytics.yolo.utils.torch_utils import model_info_for_loggers
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
from importlib.metadata import version
|
|
|
|
from importlib.metadata import version
|
|
|
@ -100,12 +100,7 @@ def on_fit_epoch_end(trainer):
|
|
|
|
live.log_metric(metric, value)
|
|
|
|
live.log_metric(metric, value)
|
|
|
|
|
|
|
|
|
|
|
|
if trainer.epoch == 0:
|
|
|
|
if trainer.epoch == 0:
|
|
|
|
model_info = {
|
|
|
|
for metric, value in model_info_for_loggers(trainer).items():
|
|
|
|
'model/parameters': get_num_params(trainer.model),
|
|
|
|
|
|
|
|
'model/GFLOPs': round(get_flops(trainer.model), 3),
|
|
|
|
|
|
|
|
'model/speed(ms)': round(trainer.validator.speed['inference'], 3)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for metric, value in model_info.items():
|
|
|
|
|
|
|
|
live.log_metric(metric, value, plot=False)
|
|
|
|
live.log_metric(metric, value, plot=False)
|
|
|
|
|
|
|
|
|
|
|
|
_log_plots(trainer.plots, 'train')
|
|
|
|
_log_plots(trainer.plots, 'train')
|
|
|
|