IndexError: The shape of the mask [32, 8732] at index 0does not match the shape of the indexed tensor [279424, 1] at index 0

如果出现类似于以上的索引错误,需要将layers/modules/multibox_loss.py 的代码按照下图修改即可。注释掉的是源代码,下面的是新加的,即交换两行代码的顺序即可。

解决了这个问题,又会出现一个新问题:

IndexError: invalid index of a 0-dim tensor. Use tensor.item() to
convert a 0-dim tensor to a Python number

解决方法:将错误行的 .data[0] 修改为 .item() 即可:

 # loc_loss += loss_l.data[0]# conf_loss += loss_c.data[0]loc_loss += loss_l.item()
conf_loss += loss_c.item()

SSD报错:The shape of the mask [32, 8732] at index 0does not match the shape of the indexed tenso相关推荐

  1. IndexError: The shape of the mask [32, 8732] at index 0does not match the shape of the indexed tenso

    参考The shape of the mask [32, 8732] at index 0 - 云+社区 - 腾讯云 IndexError: The shape of the mask [32, 87 ...

  2. 安装32位mysql报错_在CentOS中安装32位或64位MySql报错error: Failed dependencies解决办法...

    在CentOS中安装MySql报错error: Failed dependencies解决办法 安装64位MySql报错内容如下: error: Failed dependencies: libaio ...

  3. 2.* 版本taro引入 taro-ui编译小程序阶段报错, Module not found: Can‘t resolve ‘./style/index.scss‘

    这个问题 困了好久, 好像之前是闲着没事,把本地的依赖删除了,重新安装之后,就一直报的这个问题, 我去吧 taro-ui 和 taro 的 git. issue 翻了一个遍 看了各种各样的文档也没解决 ...

  4. SpringBoot项目启动 报错:Error executing Maven. end tag name </settings> must match start tag name

    SpringBoot项目启动 报错:Error executing Maven. end tag name must match start tag name from line xxx 第一次创建s ...

  5. maskrcnn训练问题报错:selected_polygons.append(self.polygons[i]) IndexError: list index out of range

    训练mask rcnn实例分割时报错: Traceback (most recent call last):File "tools/train_net.py", line 203, ...

  6. WebService报错:org.apache.axis2.AxisFault: The given SOAPAction aaa does not match an operation.

    最近在写webservice接口,首先是用cxf发布了webservice接口,现在要求用axis2去远程调用cxf写的接口,遇到了一个错误:org.apache.axis2.AxisFault: T ...

  7. MindSpore报错ValueError:For xx,the x shape:xx must be equal to xxx

    1 报错描述 1.1 系统环境 Hardware Environment(Ascend/GPU/CPU): GPU Software Environment: – MindSpore version ...

  8. Keras 报错:An operation has `None` for gradient.

    结论:自定义层的时候不要在build里定义不会在call里调用的 trainable 变量 报错原文: ValueError: An operation has `None` for gradient ...

  9. 解决pandas索引报错Unalignable boolean Series provided as indexer

    完整报错如下:pandas.core.indexing.IndexingError: Unalignable boolean Series provided as indexer (index of ...

最新文章

  1. [JS][C++]两题斐波那契数列:上台阶、triangle
  2. unity 优秀开源项目
  3. html判断表单是否为空,layui判断表单是否为空
  4. Eclipse中Program arguments和VM arguments的说明
  5. HTML 5 Canvas
  6. Windows 10下高效工作——快捷键一览
  7. 面试时如何在众多Java工程师中脱颖而出
  8. 用Netfilter模块实现基于令牌桶的每IP地址流量控制
  9. SMA连接器与BNC连接器用途有什么不同
  10. java 提示语法错误_java常见语法错误
  11. voc旋转标注数据转dota类型
  12. 2022建筑电工(建筑特殊工种)考试题目模拟考试平台操作
  13. TutorialsPoint NumPy 教程
  14. 离线数据仓库项目--技术选择
  15. 算法提升(一)二分法
  16. JSP四大作用域,九大内置对象
  17. mybatis sql解析问题(JSQLParserException)
  18. unity光圈旋转效果
  19. 你必须得知道的人工智能领域的大师与大事
  20. css如何实现菱形背景图片,使用CSS 实现菱形图片,斜条纹背景

热门文章

  1. MacOS QQ红包助手 (消息防撤回、自动抢红包)
  2. flink内部计算指标的95线-99线等的实现
  3. 写给高端大气上档次的你!
  4. JAVA入门遇到的问题01 超大数字大小比较
  5. 近百个Android优秀开源项目
  6. 乐视网造假上市,法律后果有哪些?
  7. 购买计算机如何选择CPU,电脑CPU如何挑选 电脑小白选购CPU注意事项
  8. catia三边倒角_CATIA怎么倒角
  9. 麒麟OS+龙芯环境编译GreatSQL
  10. Unity笔记---模拟行星旋转(含代码)