Open hbl843449791 opened 1 month ago
似乎是配置文件中没有设置optimizer_config导致的
This repository does not support fp16 training.
This repository does not support fp16 training.
mmdet.apis.train.py的182行 `
fp16_cfg = cfg.get('fp16', None)
if fp16_cfg is not None:
optimizer_config = Fp16OptimizerHook(
**cfg.optimizer_config, **fp16_cfg, distributed=distributed)
elif distributed and 'type' not in cfg.optimizer_config:
optimizer_config = OptimizerHook(**cfg.optimizer_config)
else:
optimizer_config = cfg.optimizer_config
` 但是配置文件里面只有optimizer,没有optimizer_config,所以报的这个错
Traceback (most recent call last): File "tools/train.py", line 245, in
main()
File "tools/train.py", line 241, in main
meta=meta)
File "/mnt/data/Co-DETR/tools/mmdet/apis/train.py", line 187, in train_detector
elif distributed and 'type' not in cfg.optimizer_config:
File "/mnt/data/miniconda/envs/co-detr/lib/python3.7/site-packages/mmcv/utils/config.py", line 513, in getattr
return getattr(self._cfg_dict, name)
File "/mnt/data/miniconda/envs/co-detr/lib/python3.7/site-packages/mmcv/utils/config.py", line 49, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'optimizer_config'