Fix EdgeTPU wrong PyTorch device (#17199)

Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/17183/head^2
Skillnoob 2 weeks ago committed by GitHub
parent aa463705f4
commit 04ed6f2e50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      ultralytics/nn/autobackend.py

@ -345,6 +345,7 @@ class AutoBackend(nn.Module):
model_path=w,
experimental_delegates=[load_delegate(delegate, options={"device": device})],
)
device = "cpu" # Required, otherwise PyTorch will try to use the wrong device
else: # TFLite
LOGGER.info(f"Loading {w} for TensorFlow Lite inference...")
interpreter = Interpreter(model_path=w) # load TFLite model

Loading…
Cancel
Save