facenet-pytorch
facenet-pytorch copied to clipboard
Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible
I installed with pip install facenet-pytorch, then I run the fintune example, got this:
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.
OS: ubuntu python:3.7 torch:1.7.0 torchvision:0.8.1 cuda:10.1
While I conda activate to pytorch1.6 env, Got this:
RuntimeError: object has no attribute nms: File "/home/AlgorithmicGroup/yw/miniconda3/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 40 by NMS, sorted in decreasing order of scores """ return torch.ops.torchvision.nms(boxes, scores, iou_threshold) ~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE 'nms' is being compiled since it was called from 'batched_nms' File "/home/AlgorithmicGroup/yw/miniconda3/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 82 offsets = idxs.to(boxes) * (max_coordinate + torch.tensor(1).to(boxes)) boxes_for_nms = boxes + offsets[:, None] keep = nms(boxes_for_nms, scores, iou_threshold) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE return keep
I face the same issue. Any further progress on that?
我面临着同样的问题。在这方面还有进一步的进展吗? conda activate yolov5启动就可以了
There are requirements for cuda toolkit, torch and torchvision versions combinations.
If you follow requirements listed below, you will see that torch:1.7.0 and torchvision:0.8.1 both requires cuda 10.2 https://pytorch.org/get-started/previous-versions/
But as you can see there is also specific versions of torch 1.7.0 and torchvision:0.8.1 for cuda 10.1. This recipe worked for me with cuda 11.4.
os: ubuntu 20.04 platform: cpu python: 3.7 torch: 1.6.0+cpu torchvision: 0.7.0+cpu
this recipy is availabel for me