Add best.pt val and COCO pycocotools val (#98)

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>
This commit is contained in:
Glenn Jocher
2022-12-27 04:56:24 +01:00
committed by GitHub
parent a1808eeda4
commit 6f0ba81427
12 changed files with 159 additions and 115 deletions

View File

@ -12,8 +12,8 @@ class ClassificationTrainer(BaseTrainer):
def set_model_attributes(self):
self.model.names = self.data["names"]
def load_model(self, model_cfg=None, weights=None):
# TODO: why treat clf models as unique. We should have clf yamls?
def load_model(self, model_cfg=None, weights=None, verbose=True):
# TODO: why treat clf models as unique. We should have clf yamls? YES WE SHOULD!
if isinstance(weights, dict): # yolo ckpt
weights = weights["model"]
if weights and not weights.__class__.__name__.startswith("yolo"): # torchvision
@ -57,6 +57,9 @@ class ClassificationTrainer(BaseTrainer):
def resume_training(self, ckpt):
pass
def final_eval(self):
pass
@hydra.main(version_base=None, config_path=str(DEFAULT_CONFIG.parent), config_name=DEFAULT_CONFIG.name)
def train(cfg):