Closed keeprunningcelin closed 4 years ago
Hi @keeprunningcelin, have you modified the vegcn/configs/cfg_test_gcne_ms1m.py
? It is a bit of weird that the AttributeError is raised when parsing the config. BTW, does sh scripts/vegcn/test_gcn_v_ms1m.sh
work well?
Hi I also met the same issue. I ran _sh scripts/vegcn/train_gcn_vms1m.sh
AttributeError: 'ConfigDict' object has no attribute 'model'
Traceback (most recent call last):
File "vegcn/main.py", line 104, in
What is your mmcv version?
@keeprunningcelin @rose-jinyang Thanks for posting the issue. As discussed with @rose-jinyang, it seems to be the problem of mmcv version. In my test, it works fine under mmcv==0.2.5 and mmcv==0.2.14. I will try to fix it under the latest mmcv.
You're right. It works well under mmcv==0.2.14. Thanks
Hi @keeprunningcelin, for current usage, you may need to switch to previous version of mmcv by pip install mmcv==0.3.2
. It works well when mmcv is under 0.4.0
.
Besides, I post an issue on https://github.com/open-mmlab/mmcv/issues/248 to discuss this problem. You can keep an eye on the discussions.
Thanks @yl-1993 .I change the version of mmcv. It works well.
Hi @keeprunningcelin, mmcv has fixed this issue. I think it be available after next mmcv release. View the above issue to check more details.
@yl-1993 Hi, I ran train_gcn_e_ms1m.py to train my own dataset, but also met the similar problem:
Traceback (most recent call last):
File "vegcn/main.py", line 104, in
I tried several version of mmcv but still failed, 0.2.15, 0.2.14, 0.3.2 they didn't work. And I checked the config file "cfg_train_gcnv_ms1m.py" there is a "predix" in it. Could you tell whether the newest version of mmcv works?
Before this I have met "AttributeError: 'ConfigDict' object has no attribute 'model' ", and I changed the mmcv version to 0.3.2 and it worked, but now I have this. Thanks for your reply!
@linjiawen2019 Could you please give more detailed information about your environment?
I tested it under following settings and they all seemed to work well.
(1) torch==1.1.0
, mmcv==0.5.6
;
(2) torch==1.1.0
, mmcv==0.3.2
;
(3) torch==0.4.0
, mmcv==0.2.15
@linjiawen2019您能不能提供有关您的环境的更多详细信息? 我在下面的设置下对其进行了测试,它们似乎都运行良好。 (1)
torch==1.1.0
,mmcv==0.5.6
; (2)torch==1.1.0
,mmcv==0.3.2
; (3)torch==0.4.0
,mmcv==0.2.15
if torch == 1.7.1, mmcv==??, I meet the same question. Can you tell me the right version? Thank you very much!
if torch == 1.12.1, mmcv==??, I meet the same question. Can you tell me the right version? Thank you very much!
error when run sh scripts/vegcn/test_gcn_e_ms1m.sh
Traceback (most recent call last): File "vegcn/main.py", line 105, in
main()
File "vegcn/main.py", line 47, in main
cfg = Config.fromfile(args.config)
File "/home/celin/anaconda3/envs/gtw_center/lib/python3.6/site-packages/mmcv/utils/config.py", line 152, in fromfile
cfg_dict, cfg_text = Config._file2dict(filename)
File "/home/celin/anaconda3/envs/gtw_center/lib/python3.6/site-packages/mmcv/utils/config.py", line 91, in _file2dict
mod = import_module('_tempconfig')
File "/home/celin/anaconda3/envs/gtw_center/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/tmp/tmpwsk1pmar/_tempconfig.py", line 21, in
File "/home/celin/anaconda3/envs/gtw_center/lib/python3.6/site-packages/mmcv/utils/config.py", line 264, in getattr
return getattr(self._cfg_dict, name)
File "/home/celin/anaconda3/envs/gtw_center/lib/python3.6/site-packages/mmcv/utils/config.py", line 34, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'model'