RuntimeError: No such operator torchvision::nms
See original GitHub issueSimilar to #1405, but I’m seeing this issue in the nightly builds.
What I did:
I download two nightly wheels from https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html, and installed them with:
pip install torch-1.4.0.dev20191017+cu100-cp37-cp37m-linux_x86_64.whl torchvision-0.5.0.dev20191017+cu100-cp37-cp37m-linux_x86_64.whl
Then, I recompile detectron2; Running a simple detectron2 evaluation raises this error:
python tools/train_net.py --config-file configs/LVIS-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml --num-gpus 2 --eval-only DATALOADER.NUM_WORKERS 1 MODEL.WEIGHTS ~/data/D2models/LVIS-InstanceSegmentation/mask_rcnn_R_101_FPN_1x/144219035/model_final_824ab5.pkl
an example stack trace:
Traceback (most recent call last):
File "tools/train_net.py", line 162, in <module>
args=(args,),
File "/private/home/yuxinwu/detectron2/detectron2/engine/launch.py", line 52, in launch
main_func(*args)
File "tools/train_net.py", line 133, in main
res = Trainer.test(cfg, model)
File "/private/home/yuxinwu/detectron2/detectron2/engine/defaults.py", line 413, in test
results_i = inference_on_dataset(model, data_loader, evaluator)
File "/private/home/yuxinwu/detectron2/detectron2/evaluation/evaluator.py", line 118, in inference_on_dataset
outputs = model(inputs)
File "/private/home/yuxinwu/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/private/home/yuxinwu/detectron2/detectron2/modeling/meta_arch/rcnn.py", line 66, in forward
return self.inference(batched_inputs)
File "/private/home/yuxinwu/detectron2/detectron2/modeling/meta_arch/rcnn.py", line 119, in inference
proposals, _ = self.proposal_generator(images, features, None)
File "/private/home/yuxinwu/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/private/home/yuxinwu/detectron2/detectron2/modeling/proposal_generator/rpn.py", line 179, in forward
self.training,
File "/private/home/yuxinwu/detectron2/detectron2/modeling/proposal_generator/rpn_outputs.py", line 136, in find_top_rpn_proposals
keep = batched_nms(boxes.tensor, scores_per_img, lvl, nms_thresh)
File "/private/home/yuxinwu/detectron2/detectron2/layers/nms.py", line 17, in batched_nms
return box_ops.batched_nms(boxes, scores, idxs, iou_threshold)
File "/private/home/yuxinwu/miniconda3/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 70, in batched_nms
keep = nms(boxes_for_nms, scores, iou_threshold)
File "/private/home/yuxinwu/miniconda3/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 31, in nms
return torch.ops.torchvision.nms(boxes, scores, iou_threshold)
File "/private/home/yuxinwu/miniconda3/lib/python3.7/site-packages/torch/_ops.py", line 61, in __getattr__
op = torch._C._jit_get_operation(qualified_op_name)
RuntimeError: No such operator torchvision::nms
another stack trace: https://github.com/facebookresearch/detectron2/issues/94#issue-507812638
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:35 (16 by maintainers)
Top Results From Across the Web
No such operator torchvision::nms · Issue #1405 · pytorch/vision
The error you are getting indicates that you haven't compiled the new torchvision extensions. For that, you should clone the repo, uninstall ...
Read more >No such operator torchvision::nms - pytorch - Stack Overflow
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 ......
Read more >No such operator torchvision::nms Fix - Pav Creations
In this post I'll describe my most recent hurdle with the infamous No such operator torchvision::nms issue and describe the patch.
Read more >RuntimeError: No such operator torchvision::nms
i use pytorch1.4+torchvision0.5(CPU in Windows)。when i use run detection model,it show that.Can someone tell me how to solve it?
Read more >PyTorch KR | from torchvision.ops import nms 를 한 후
RuntimeError : No such operator torchvision::nms · Issue #1489 · pytorch/vision. Similar to #1405, but I'm seeing this issue in the nightly builds....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, I could reproduce the problem thanks to @pedrofreire snippet. It seems to be due to installing the package with
python setup.py install
, while I’ve always usedpython setup.py build develop
in order to be able to modify the library without reinstalling it.I’m looking into a fix
Not right now (for OSS builds). We’ll look into it, but it is much easier to get a small app size if you’re able to bring all of the code into a single library.