自监督预训练模型的评估“检测”下游任务时报错 #711
Unanswered
huadouxiansheng
asked this question in
How-to
Replies: 1 comment 1 reply
-
for |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我在进行自监督预训练模型的评估“检测”下游任务时遇到了如下错误
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/root/miniconda3/lib/python3.8/site-packages/mmdet/models/roi_heads/base_roi_head.py", line 29, in init
self.shared_head = MODELS.build(shared_head)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/registry.py", line 454, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 240, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 100, in build_from_cfg
raise KeyError(
KeyError: 'ResLayerExtraNorm is not in the model registry. Please check whether the value of
ResLayerExtraNorm
is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/tutorials/config.html#import-custom-python-modules'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/root/miniconda3/lib/python3.8/site-packages/mmdet/models/detectors/faster_rcnn.py", line 20, in init
super().init(
File "/root/miniconda3/lib/python3.8/site-packages/mmdet/models/detectors/two_stage.py", line 61, in init
self.roi_head = MODELS.build(roi_head)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/registry.py", line 454, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 240, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 135, in build_from_cfg
raise type(e)(
KeyError: "class
StandardRoIHead
in mmdet/models/roi_heads/standard_roi_head.py: 'ResLayerExtraNorm is not in the model registry. Please check whether the value ofResLayerExtraNorm
is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/tutorials/config.html#import-custom-python-modules'"During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/mmdet/.mim/tools/train.py", line 130, in
main()
File "/root/miniconda3/lib/python3.8/site-packages/mmdet/.mim/tools/train.py", line 119, in main
runner = Runner.from_cfg(cfg)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/runner/runner.py", line 437, in from_cfg
runner = cls(
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/runner/runner.py", line 404, in init
self.model = self.build_model(model)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/runner/runner.py", line 806, in build_model
model = MODELS.build(model)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/registry.py", line 454, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 240, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 135, in build_from_cfg
raise type(e)(
KeyError: 'class
FasterRCNN
in mmdet/models/detectors/faster_rcnn.py: "classStandardRoIHead
in mmdet/models/roi_heads/standard_roi_head.py: 'ResLayerExtraNorm is not in the model registry. Please check whether the value ofResLayerExtraNorm
is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/tutorials/config.html#import-custom-python-modules\'"'ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 3981) of binary: /root/miniconda3/bin/python
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/miniconda3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/launch.py", line 195, in
main()
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/launch.py", line 191, in main
launch(args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/launch.py", line 176, in launch
run(args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/run.py", line 753, in run
elastic_launch(
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 132, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 246, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
/root/miniconda3/lib/python3.8/site-packages/mmdet/.mim/tools/train.py FAILED
Failures:
<NO_OTHER_FAILURES>
Root Cause (first observed failure):
[0]:
time : 2023-03-05_22:34:54
host : autodl-container-aa4e118752-21317029
rank : 0 (local_rank: 0)
exitcode : 1 (pid: 3981)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
Traceback (most recent call last):
File "/root/miniconda3/bin/mim", line 8, in
sys.exit(cli())
File "/root/miniconda3/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/root/miniconda3/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/miniconda3/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/miniconda3/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/mim/commands/train.py", line 100, in cli
is_success, msg = train(
File "/root/miniconda3/lib/python3.8/site-packages/mim/commands/train.py", line 261, in train
ret = subprocess.check_call(
File "/root/miniconda3/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/root/miniconda3/bin/python', '-m', 'torch.distributed.launch', '--nproc_per_node=1', '--master_port=20445', '/root/miniconda3/lib/python3.8/site-packages/mmdet/.mim/tools/train.py', 'configs/benchmarks/mmdetection/voc0712/faster-rcnn_r50-c4_ms-24k_voc0712.py', '--launcher', 'pytorch', '--work-dir', 'work_dirs/benchmarks/mmdetection/voc0712/faster-rcnn_r50-c4_ms-24k_voc0712/backbone200.pth', '--cfg-options', 'model.backbone.init_cfg.type=Pretrained', 'model.backbone.init_cfg.checkpoint=work_dirs/selfsup/mocov2_resnet50_8xb32-coslr-200e_incustom/backbone200.pth', 'model.backbone.init_cfg.prefix=backbone.', 'model.roi_head.shared_head.init_cfg.type=Pretrained', 'model.roi_head.shared_head.init_cfg.checkpoint=work_dirs/selfsup/mocov2_resnet50_8xb32-coslr-200e_incustom/backbone200.pth', 'model.roi_head.shared_head.init_cfg.prefix=backbone.']' returned non-zero exit status 1.
不知道如何改正
Beta Was this translation helpful? Give feedback.
All reactions