Skip to content
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

'Non-existent config key: MODEL.BACKBONE.OUT_CHANNELS' #112

Open
christina1228 opened this issue Dec 16, 2021 · 1 comment
Open

'Non-existent config key: MODEL.BACKBONE.OUT_CHANNELS' #112

christina1228 opened this issue Dec 16, 2021 · 1 comment

Comments

@christina1228
Copy link

when I want to run the demo, it become (the last few lines)
~/anaconda3/envs/vilbert-mt/lib/python3.6/site-packages/yacs/config.py in _merge_a_into_b(a, b, root, key_list)
476 if isinstance(v, CfgNode):
477 try:
--> 478 _merge_a_into_b(v, b[k], root, key_list + [k])
479 except BaseException:
480 raise

~/anaconda3/envs/vilbert-mt/lib/python3.6/site-packages/yacs/config.py in _merge_a_into_b(a, b, root, key_list)
489 root.raise_key_rename_error(full_key)
490 else:
--> 491 raise KeyError("Non-existent config key: {}".format(full_key))
492
493

KeyError: 'Non-existent config key: MODEL.BACKBONE.OUT_CHANNELS'
12/16/2021 09:09:14 PM INFO: Shutdown kernel
12/16/2021 09:09:14 PM WARNING: Exiting with nonzero exit status

@christina1228
Copy link
Author


KeyError Traceback (most recent call last)
in
2 # ViLBERT part
3 # =============================
----> 4 feature_extractor = FeatureExtractor()
5
6 args = SimpleNamespace(from_pretrained= "save/multitask_model/pytorch_model_9.bin",

in init(self)
5 def init(self):
6 self.args = self.get_parser()
----> 7 self.detection_model = self._build_detection_model()
8
9 def get_parser(self):

in _build_detection_model(self)
19
20 def _build_detection_model(self):
---> 21 cfg.merge_from_file(self.args.config_file)
22 cfg.freeze()
23

~/anaconda3/envs/vilbert-mt/lib/python3.6/site-packages/yacs/config.py in merge_from_file(self, cfg_filename)
211 with open(cfg_filename, "r") as f:
212 cfg = self.load_cfg(f)
--> 213 self.merge_from_other_cfg(cfg)
214
215 def merge_from_other_cfg(self, cfg_other):

~/anaconda3/envs/vilbert-mt/lib/python3.6/site-packages/yacs/config.py in merge_from_other_cfg(self, cfg_other)
215 def merge_from_other_cfg(self, cfg_other):
216 """Merge cfg_other into this CfgNode."""
--> 217 _merge_a_into_b(cfg_other, self, self, [])
218
219 def merge_from_list(self, cfg_list):

~/anaconda3/envs/vilbert-mt/lib/python3.6/site-packages/yacs/config.py in _merge_a_into_b(a, b, root, key_list)
476 if isinstance(v, CfgNode):
477 try:
--> 478 _merge_a_into_b(v, b[k], root, key_list + [k])
479 except BaseException:
480 raise

~/anaconda3/envs/vilbert-mt/lib/python3.6/site-packages/yacs/config.py in _merge_a_into_b(a, b, root, key_list)
476 if isinstance(v, CfgNode):
477 try:
--> 478 _merge_a_into_b(v, b[k], root, key_list + [k])
479 except BaseException:
480 raise

~/anaconda3/envs/vilbert-mt/lib/python3.6/site-packages/yacs/config.py in _merge_a_into_b(a, b, root, key_list)
489 root.raise_key_rename_error(full_key)
490 else:
--> 491 raise KeyError("Non-existent config key: {}".format(full_key))
492
493

KeyError: 'Non-existent config key: MODEL.BACKBONE.OUT_CHANNELS'
12/16/2021 09:09:14 PM INFO: Shutdown kernel
12/16/2021 09:09:14 PM WARNING: Exiting with nonzero exit status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant