Pip debug fixes (#139)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
340376f7a6
commit
d74de2582c
8 changed files with 37 additions and 37 deletions
|
|
@ -213,9 +213,8 @@ class YOLO:
|
|||
|
||||
@smart_inference_mode()
|
||||
def __call__(self, imgs):
|
||||
if not self.model:
|
||||
LOGGER.info("model not initialized!")
|
||||
return self.model(imgs)
|
||||
device = next(self.model.parameters()).device # get model device
|
||||
return self.model(imgs.to(device))
|
||||
|
||||
def forward(self, imgs):
|
||||
return self.__call__(imgs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue