General cleanup (#69)
Co-authored-by: ayush chaurasia <ayush.chaurarsia@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
@ -4,6 +4,7 @@ Top-level YOLO model interface. First principle usage example - https://github.c
|
||||
import torch
|
||||
import yaml
|
||||
|
||||
from ultralytics import yolo
|
||||
from ultralytics.yolo.utils import LOGGER
|
||||
from ultralytics.yolo.utils.checks import check_yaml
|
||||
from ultralytics.yolo.utils.modeling import attempt_load_weights
|
||||
|
@ -327,7 +327,7 @@ class BaseTrainer:
|
||||
metrics = self.validator(self)
|
||||
fitness = metrics.pop("fitness", -self.loss.detach().cpu().numpy()) # use loss as fitness measure if not found
|
||||
if not self.best_fitness or self.best_fitness < fitness:
|
||||
self.best_fitness = self.fitness
|
||||
self.best_fitness = fitness
|
||||
return metrics, fitness
|
||||
|
||||
def log(self, text, rank=-1):
|
||||
|
Reference in New Issue
Block a user