vision: No such operator torchvision::nms

Hi,

I’m get an error when I try to use new torch.ops, e.g.

import torch
torch.ops.torchvision.nms

results in

/usr/local/lib/python3.6/dist-packages/torch/_ops.py in __getattr__(self, op_name)
---> 61         op = torch._C._jit_get_operation(qualified_op_name)

RuntimeError: No such operator torchvision::nms`

No matter if I use nightly build or master clone, e.g. pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html

How to debug setup.py to track where comilation/loading fails?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 8
  • Comments: 37 (13 by maintainers)

Most upvoted comments

@chiboreache PyTorch 1.6.0 requires torchvision 0.7.0

@chiboreache PyTorch 1.6.0 requires torchvision 0.7.0

Thanks!!!

Hi, I managed to find a compatible (working) pair of torchvision and torch. torch: 1.3.0 torchvision: 0.4.1

Hey guys, I meet the same problem: RuntimeError: No such operator torchvision::nms with torch1.6 with torchvision0.7, and torch1.7 with torchvision0.8.1. Then I modifty the code to such a way and it works: from torch.ops.torchvision.nms(boxes, scores, iou_thres) to
import torchvision torchvision.ops.nms(boxes, scores, iou_thres) Hope this is helpful.

I met the same erro:No such operator torchvision::nms.So I change the version of pytoch and torchvision to 1.2.0 and 0.4.0,but the erro is still here. update(2020/4/21) I hava solved this issue by changing the version of numpy from 1.18.1 to 1.17.0.

I did like was noticed here but the new issues appeared later: if expr.id == “True”: RecursionError: maximum recursion depth exceeded in comparison

Also, tried to downgrade version like: pip3 install torch==1.4.0 torchvision==0.5.0 -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn/simple

Alas, unsuccessfully

torchvision 0.7.0

yes, I changed to 0.7.0, and it worked

@GotFusion I believe the issue is still incompatibility of the versions – you might be using a different python environment for running the code than the one you used for checking the versions

Thank you for your advice. I have changed the python version to 3.7.9, and it works now

@davidsteinar - if you’re still encountering this please create a new issue to gain visibility

The error indicates that there is an uncompatibility between the version of PyTorch that was used to build torchvision and the version of PyTorch that you are using (it’s not clear from the message unfortunately)

I’m fixing things now so that torchvision nightly depend on PyTorch nightly, and I’ll regenerate the binaries.

Hi,

Can you print torch.__version__ and torchvision.__version__?

What is a bit confusing now is that torchvision nightly requires torch 1.3.0, and NOT a torch nightly, so this might be the reason