torchvision:nms does not exist

使用从源码构建的pytorch时发生如下错误:

RuntimeError: operator torchvision::nms does not exist with torch 2.2.1

解决方案:

同样从源码安装 vision 即可

I tried to install torchvision from source https://github.com/pytorch/vision.git, which is feasible, but it also requires the use of develop mode, similar to running "python setup.py develop".

我尝试从源码 [https://github.com/pytorch/vision.git\][1] 安装 torchvision,这是可行的,但也需要使用开发模式,类似于运行"python setup.py develop"。

参考:

https://stackoverflow.com/questions/78606054/torchvisionnms-does-not-exist/78705127#78705127

https://github.com/pytorch/pytorch/issues/122494