SSD报错:The shape of the mask [32, 8732] at index 0does not match the shape of the indexed tenso
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相关推荐
- 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 ...
- 安装32位mysql报错_在CentOS中安装32位或64位MySql报错error: Failed dependencies解决办法...
在CentOS中安装MySql报错error: Failed dependencies解决办法 安装64位MySql报错内容如下: error: Failed dependencies: libaio ...
- 2.* 版本taro引入 taro-ui编译小程序阶段报错, Module not found: Can‘t resolve ‘./style/index.scss‘
这个问题 困了好久, 好像之前是闲着没事,把本地的依赖删除了,重新安装之后,就一直报的这个问题, 我去吧 taro-ui 和 taro 的 git. issue 翻了一个遍 看了各种各样的文档也没解决 ...
- 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 ...
- 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, ...
- WebService报错:org.apache.axis2.AxisFault: The given SOAPAction aaa does not match an operation.
最近在写webservice接口,首先是用cxf发布了webservice接口,现在要求用axis2去远程调用cxf写的接口,遇到了一个错误:org.apache.axis2.AxisFault: T ...
- 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 ...
- Keras 报错:An operation has `None` for gradient.
结论:自定义层的时候不要在build里定义不会在call里调用的 trainable 变量 报错原文: ValueError: An operation has `None` for gradient ...
- 解决pandas索引报错Unalignable boolean Series provided as indexer
完整报错如下:pandas.core.indexing.IndexingError: Unalignable boolean Series provided as indexer (index of ...
最新文章
- [JS][C++]两题斐波那契数列:上台阶、triangle
- unity 优秀开源项目
- html判断表单是否为空,layui判断表单是否为空
- Eclipse中Program arguments和VM arguments的说明
- HTML 5 Canvas
- Windows 10下高效工作——快捷键一览
- 面试时如何在众多Java工程师中脱颖而出
- 用Netfilter模块实现基于令牌桶的每IP地址流量控制
- SMA连接器与BNC连接器用途有什么不同
- java 提示语法错误_java常见语法错误
- voc旋转标注数据转dota类型
- 2022建筑电工(建筑特殊工种)考试题目模拟考试平台操作
- TutorialsPoint NumPy 教程
- 离线数据仓库项目--技术选择
- 算法提升(一)二分法
- JSP四大作用域,九大内置对象
- mybatis sql解析问题(JSQLParserException)
- unity光圈旋转效果
- 你必须得知道的人工智能领域的大师与大事
- css如何实现菱形背景图片,使用CSS 实现菱形图片,斜条纹背景