-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'Non-existent config key: MODEL.PRETRAINED_MODELS' #9
Comments
I have updated my pre-trained models in README.md. You can download the pre-trained models and put them in the pretrained_models dir. |
I have put both the R-101.pkl and R-50.pkl files in the pretrained directory and still getting the same error |
@ak9250 so have you solved that error? I got the same error. |
@ak9250 I solved the problem. Just add the "key=value" to the correct place of PY file ~/maskscoring_rcnn/maskrcnn_benchmark/config/defaults.py. For example, add "_C.MODEL.PRETRAINED_MODELS = 'pretrained_models'" on line 24. |
@maomaochongchh did you delete what was on line 24 and then add that now i am getting |
@ak9250 No, just add a line. As for your new error, I think you should make sure that you run it in correct environment and path. And if you want to know clearly why the previous error happened, you should spent sometime to see the function "merge_from_file()". |
I added "_C.MODEL.PRETRAINED_MODELS = 'pretrained_models'",but still got error. _pickle.UnpicklingError: invalid load key, '<'. |
@aguang1201 I got the same error when loading the model.
I found this is path problem. The file-path in the code is like './pretrained_model/***'. So you have to put your Jupiter/script file in the same director as pre_train folder. |
I got the another error. |
Hey @13012476909 |
The issue still persists. |
From where did you get those files? |
怎么弄?还是不行 |
I have solved this problem by adding a line "cfg.set_new_allowed(True)" before "cfg.merge_from_file(args.config_file)" in my .py file. |
Traceback (most recent call last):
File "tools/train_net.py", line 171, in
main()
File "tools/train_net.py", line 143, in main
cfg.merge_from_file(args.config_file)
File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 213, in merge_from_file
self.merge_from_other_cfg(cfg)
File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 217, in merge_from_other_cfg
_merge_a_into_b(cfg_other, self, self, [])
File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 460, in _merge_a_into_b
_merge_a_into_b(v, b[k], root, key_list + [k])
File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 473, in _merge_a_into_b
raise KeyError("Non-existent config key: {}".format(full_key))
KeyError: 'Non-existent config key: MODEL.PRETRAINED_MODELS'
The text was updated successfully, but these errors were encountered: