按照NVIDIA官网指示,在arm64上安装torch和torchvision后,运行YOLOv5出现以下问题:
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.
解决方法参考以下链接,其中提问者自己找到的解决方法对我有效:
https://forums.developer.nvidia.com/t/pytorch-and-torchvision-versions-are-incompatible/231225/4