Cleanup (#168)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kalen Michael <kalenmike@gmail.com>
This commit is contained in:
parent
6feba17760
commit
422c49d439
97 changed files with 224 additions and 757 deletions
|
|
@ -1,3 +1,5 @@
|
|||
# Ultralytics YOLO 🚀, GPL-3.0 license
|
||||
|
||||
import json
|
||||
import platform
|
||||
from collections import OrderedDict, namedtuple
|
||||
|
|
@ -65,6 +67,7 @@ class AutoBackend(nn.Module):
|
|||
names = model.module.names if hasattr(model, 'module') else model.names # get class names
|
||||
model.half() if fp16 else model.float()
|
||||
self.model = model # explicitly assign for to(), cpu(), cuda(), half()
|
||||
pt = True
|
||||
elif pt: # PyTorch
|
||||
from ultralytics.nn.tasks import attempt_load_weights
|
||||
model = attempt_load_weights(weights if isinstance(weights, list) else w,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue