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>
This commit is contained in:
parent
aa463705f4
commit
04ed6f2e50
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue