运行时报错
来源:7-9 MMdetection训练Passcal VOC目标检测任务(下)

Hero_wang14
2021-12-23
Traceback (most recent call last):
File “tools/train.py”, line 185, in
main()
File “tools/train.py”, line 158, in main
test_cfg=cfg.get(‘test_cfg’))
File “/home/whr/anaconda3/lib/python3.7/site-packages/mmdet/models/builder.py”, line 59, in build_detector
cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg))
File “/home/whr/anaconda3/lib/python3.7/site-packages/mmcv/utils/registry.py”, line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File “/home/whr/anaconda3/lib/python3.7/site-packages/mmcv/cnn/builder.py”, line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File “/home/whr/anaconda3/lib/python3.7/site-packages/mmcv/utils/registry.py”, line 55, in build_from_cfg
raise type(e)(f’{obj_cls.name}: {e}’)
AssertionError: RetinaNet: ResNet: init_cfg and pretrained cannot be specified at the same time
在python tools/train.py configs/retinanet/retinanet_r50_fpn_1x_coco.py --gpus 1
运行的时候报错,是什么问题,怎么解决
1回答
-
会写代码的好厨师
2021-12-25
直接看报错日志信息比较少,看起来像预训练模型的问题,可以检查下配置文件。如果解决不了,可以把代码打包qq发给我看一下00
相似问题