admin管理员组

文章数量:1623796

(解决)Key already registered with the same priority: GroupSpatialSoftmax

原因:重复安装卸载pytorch

删除了废话

一晚上过去后,总算在这里https://discuss.pytorch/t/importerror-key-already-registered-with-the-same-priority/86271找到了解决方法。

其实就是我之前再安装torch的时候终止了,但是site-packages目录下还有torch这个文件夹,手动删除,再重新下载就解决了。

贴一下老哥的回答

I had the same problem.

I installed PyTorch following this command:
pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch/whl/torch_stable.html

However, I noticed that my Python environment had a previous installation of PyTorch+CUDA which was later removed (uninstalled).

What I found is that the uninstalled task was not able to remove all the content (library files such as *.DLLs, etc.) from torch folder in the site-packages directory. I had to delete manually that folder. Aftewards, I installed again PyTorch (with the correct version for my environment: no CUDA), and it started to work fine.

Conclusion: This problem is due to existent library files in the torch folder due to previous installations. One needs to remove them manually before reinstall again the latest version of PyTorch.

Cheers!

本文标签: registeredKeyGroupSpatialSoftmaxPriority