mmdetection 常见问题及错误记录

1、GPU下出现/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:53: lambda [](int)->auto::operator()(int)->auto: block: [9,0,0], thread: [32,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.问题

GPU上运行神经网络模型,是使用多线程并行加速的,如果出错,真正的错误信息很容易被cuda的错误信息淹没,所以难以看到错误信息,一般引起问题的原因是数组等超限,定位到具体是anchor_ratios=[0.2, 0.5, 1.0, 2.0, 5.0]修改成默认anchor_ratios=[0.5, 1.0, 2.0]就可以啦

2、在读取完配置config文件后报错,如Traceback (most recent call last):/File "tools/train.py", line 125, in <module>/main()File "tools/train.py", line 101, in main cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)/File "/cache/user-job-dir/codes/mmdetection/mmdet/models/builder.py", line 43, in build_detector/File "/cache/user-job-dir/codes/mmdetection/mmdet/models/utils/conv_module.py", line 33, in build_conv_layer/assert isinstance(cfg, dict)and 'type' in cfg

表示配置文件有错误,下面没有报具体的格式错误,如多少行有invalid syntax;,说明格式没有问题,而是配置的内容有问题,要仔细检测,定位到加了dcn配置,dcn=dict(modulated=False, deformable_groups=1, fallback_on_stride=False),

stage_with_dcn=(False, True, True, True)需要去掉

3、resnet在imagenet上的预训练模型在训练的时候下载慢,如'torchvision://resnet50',可以先本地下载,然后放到对应路径,其对应的下载链接如下

resnet_model_urls = {
    'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',
    'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth',
    'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth',
    'resnet101': 'https://download.pytorch.org/models/resnet101-5d3b4d8f.pth',
    'resnet152': 'https://download.pytorch.org/models/resnet152-b121ed2d.pth',
}

 

 

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值