'No such operator torchvision::nms
When I try to run yoloV3 detect,it happend the error
op = torch._C._jit_get_operation(qualified_op_name)
RuntimeError: No such operator torchvision::nms
Though this code is the source code of torchvision ,I try sevaral time to correct the code by the tips with failure.
Solution 1:[1]
As I met lot of hurdles to install torch and torchvison ,I'm not reluctant to reinstall the enviroment.Running 'conda list' the version of torch and torchvison ,I found they are not incompitable,the versions of two packages installed are:
torchvision-0.5.0+cu92-cp37-cp37m-win_amd64.whl
torch-1.4.0+cpu-cp37-cp37m-win_amd64.whl
I change the version of torchvison to
torchvision-0.5.0+cpu-cp37-cp37m-win_amd64.whl
I have dealt with my proplem until now. note? the enviroment of my os and python are fellowing?
Windows_X64
python3.7
Solution 2:[2]
I had the same problem on Ubuntu 18.04. Upgrading python to 3.8 and Installing fresh torch and torchvision libraries worked for me.
virtualenv -p python3.8 torch17
source torch17/bin/activate
pip install cython matplotlib tqdm scipy ipython ninja yacs opencv-python ffmpeg opencv-contrib-python Pillow scikit-image scikit-learn lmfit imutils pyyaml jupyterlab==3
pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
I tried the solutions discussed in some pytorch forums and github but that did not help.
Solution 3:[3]
Install Python 3.7 instead of 3.8 Steps:
git clone https://github.com/Megvii-BaseDetection/YOLOX
cd YOLOX
pip install requirements.txt
pip install setup.py
Solution 4:[4]
I met the same problem on Ubuntu 20.04 using python 3.7? pytoch1.7.1 & cuda11.1.
Please pay attention to install torchvision==0.8.2+cu110 rather than torchvision==0.8.2. Just change the corresponding version according to your system.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Noodles |
| Solution 2 | Abhi25t |
| Solution 3 | ベスマ・ゲスミ |
| Solution 4 | William Baker Morrison |

