Fix load and resume and update autodownload endpoint (#136)

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:
Ayush Chaurasia 2023-01-03 01:42:01 +05:30 committed by GitHub
parent 6d5123297e
commit 82c849c163
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 34 deletions

View file

@ -367,7 +367,7 @@ class BaseTrainer:
if not pretrained:
model = check_file(model)
ckpt = self.load_ckpt(model) if pretrained else None
self.model = self.load_model(model_cfg=None if pretrained else model, weights=ckpt) # model
self.model = self.load_model(model_cfg=None if pretrained else model, weights=ckpt["model"]) # model
return ckpt
def load_ckpt(self, ckpt):