Pytorch and torchvision compatability error

Hi , I installed pytorch (1.12.0a0+2c916ef.nv22.3) and torch vision(0.13.0) on Jetpack 5.0.2.

getting below error while running 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 GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision 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.

Kindly help to resolve
thanks.

Hi @Bennyjohnson, did you build torchvision from source or install it from pip? You may want to try building latest torchvision from source:

Alternatively, can you try using the l4t-pytorch container, which already has PyTorch + torchvision installed?

Torch vision installed using pip, Kindly provide the pytorch compatible torchvision source link.

Thanks.

You can find how to build/install it under the Installation instructions from this post:

Hi, Installed pytorch and torchvision as mentioned in the link , still facing same error.

thanks

Hmm okay, I would recommend trying l4t-pytorch container and that should be working: