Jetson tx2运行yolov5遇到运行时错误

问题遇到的现象和发生背景

Jeson TX2在刷机后,想运行yolov5模型,在安装了各种库之后,pytorch和torchvision分别是1.8.0和0.9.0,不过运行还是出现版本不对的问题

运行结果及报错内容

RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.version and your torchvision version with torchvision.version and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.

img


这是现在的torch和torchvision版本

我的解答思路和尝试过的方法

首次出现这个错误,看网上说是torch和torchvision版本不对应的问题,费好大劲安装好对应版本,同时torchvision是编译过的(网上说用pip下的会有问题)

?为什么要去编译?直接官网下载对应版本的whell包到本地安装就行啊。界面在这里,复制对应的包到迅雷下载就行,或者直接点击浏览器下载
cuxxx开头的是cuda版本,xxx是你的cuda版本号,10.2对应的是cu101,11.0对应的是cu110
torch=1.8.0对应的 torchvision=0.9.0, torchaudio=0.8.0