栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

from detectron2 import

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

from detectron2 import

先附上torch官网和detectron2的安装说明地址
pytorch: https://pytorch.org/get-started/previous-versions/
detectron2 installation: https://detectron2.readthedocs.io/en/latest/tutorials/install.html
按照官网方法安装相应版本的的detectron2之后出现报错,原因在于我安装的torch和torchvision无法相互对应。由于之前torch版本过高,因为我对torch和torchvision降了版本,可能是我我采用的降版本方法太蠢了,分别安装了相应的torch和torchvision,正确的方法或者最安全的做法按照torch官网来做:
pip install torch1.8.0+cu111 torchvision0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
然后再安装detectron2:
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.8/index.html
问题解决

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/339570.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号