Pin numpy 1.23.5 for JetPack 4 on NVIDIA Jetson Nano (#18783)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
a2430d0478
commit
fb3e5adfd7
2 changed files with 6 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ import torch
|
|||
import torch.nn as nn
|
||||
from PIL import Image
|
||||
|
||||
from ultralytics.utils import ARM64, IS_JETSON, IS_RASPBERRYPI, LINUX, LOGGER, ROOT, yaml_load
|
||||
from ultralytics.utils import ARM64, IS_JETSON, IS_RASPBERRYPI, LINUX, LOGGER, PYTHON_VERSION, ROOT, yaml_load
|
||||
from ultralytics.utils.checks import check_requirements, check_suffix, check_version, check_yaml
|
||||
from ultralytics.utils.downloads import attempt_download_asset, is_url
|
||||
|
||||
|
|
@ -262,6 +262,11 @@ class AutoBackend(nn.Module):
|
|||
# TensorRT
|
||||
elif engine:
|
||||
LOGGER.info(f"Loading {w} for TensorRT inference...")
|
||||
|
||||
if IS_JETSON and PYTHON_VERSION <= "3.8.0":
|
||||
# fix error: `np.bool` was a deprecated alias for the builtin `bool` for JetPack 4 with Python <= 3.8.0
|
||||
check_requirements("numpy==1.23.5")
|
||||
|
||||
try:
|
||||
import tensorrt as trt # noqa https://developer.nvidia.com/nvidia-tensorrt-download
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue