SSD训练过程中出现问题总结

在SSD模型训练过程中,遇到错误'Check failed: 0 == bottom[0]->count() % explicit_count (0 vs. 60)',原因是test.prototxt中mbox_conf_reshape的维度配置错误,需根据类别数调整。另一个错误'Check failed: num_priors_ * num_classes_ == bottom[1]->channels()'表明网络层输出不匹配,需修改conf_和loc_层的num_out。最后,如果在运行create_data.sh时出现AttributeError: 'module' object has no attribute 'LabelMap',问题可能在于未将Python路径添加到环境变量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

    Check failed: 0 == bottom[0]->count() % explicit_count (0 vs. 60) bottom count (209472) must be divisible by the product of the specified dimensions (84)

   这意味着test.prototxt内的mbox_conf_reshape配置有问题,具体是第三个dim的参数 dim:6,需要改成自己的待分类类别数目(要记得+background)

layer {
  name: "mbox_conf_reshape"
  type: "Reshape"
  bottom: "mbox_conf"
  top: "mbox_conf_reshape"
  reshape_param {
    shape {
      dim: 0
      dim: -1
      dim: 6
    }
  }
}

  Check failed: num_priors_ * num_classes_ == bottom[1]->channels() (52368 vs. 55168) Number of priors must match number of confidence predictions.

  这个意味着自己的网络层中输出个数不对应,具体需要修改每个conf_的num_out以及loc_层的num_out。num_out的基数是class和4(location的4个参数),2(confidence 的2个参数).按照之前的类别进行修改。

layer {
  name: "conv6_2_mbox_conf"
  type: "Convolution"
  bottom: "conv6_2"
  top: "conv6_2_mbox_conf"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  p
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值