检查mmcv库的版本: 根据参考信息,config 类在mmcv 的某些版本中可能已经被移除或更名。你需要确认你的代码所依赖的 mmcv 版本是否包含 config 类。你可以访问 mmcv 的 GitHub 仓库 查看历史版本和对应的变更日志。 检查代码中的导入语句: 确保你的导入语句没有拼写错误。如果 config 类确实已经被移除或更名,你需要...
今天运行github上面的一个代码,其中报错如此下: ImportError: cannot import name 'Config' from 'mmcv' 原因是高版本的mmcv已经灭有这个法那个法了,移到mmengine里面去了。 将from mmcv import Config, DictAction 改为:from mmengine import Config, DictAction 就可以解决相关问题。
frommmcvimportConfig, DictAction ImportError: cannotimportname'Config'from'mmcv'(unknown location) 卸载mmdet,在官网上下载mmdetection==2.20.0,支持的mmcv版本在mmcv_minimum_version = '1.3.17'和mmcv_maximum_version = '1.5.0',下载对应的版本重新安装 卸载原有的,安装现在的命令: pip install -v -e . ...
但官网现在mmcv升级到了2.0,如果直接装2.0的话会导致代码里很多函数不匹配,具体可以看https://github.com/open-mmlab/mmcv/pull/2217/commits 简单来说我们PSPtrain.py里line10 from mmcv import Config, DictAction from mmcv.runner import get_dist_info, init_dist from mmcv.utils import get_git_hash 这几...
ImportError: cannot import name ‘get_config‘ from ‘tensorflow.python.eager.context‘ every blog every motto: You can do more than you think. 0. 前言 报错记录 1. 正文 运行程序,报错如下: ImportError: cannot import name ‘get_config’ from ‘tensorflow.python.eager.context’ (F:\publ......