首页 Paddle框架 帖子详情
未知错误定位
收藏
快速回复
Paddle框架 问答深度学习模型训练炼丹技巧 1217 9
未知错误定位
收藏
快速回复
Paddle框架 问答深度学习模型训练炼丹技巧 1217 9

跑程序的时候不停报错:elementwise_op_function.h:1096] Error, broadcast should not into w broadcast

但是程序没停止。

怎么定位这个错误出在哪儿?

0
收藏
回复
全部评论(9)
时间顺序
thinc
#2 回复于2020-05

你翻译一下就知道了

找找你的elementwise  api,看看你运算的数据和axis是否为1

0
回复
1
181ws
#3 回复于2020-05
thinc #2
你翻译一下就知道了[图片] 找找你的elementwise  api,看看你运算的数据和axis是否为1

谢谢。我后来发现了,多了一个轴

0
回复
thinc
#4 回复于2020-05
181ws #3
谢谢。我后来发现了,多了一个轴

数据多了一个维度吗?想记录一下这种问题~

0
回复
1
181ws
#5 回复于2020-05
thinc #4
数据多了一个维度吗?想记录一下这种问题~

是的,我计算的时候有一个元素是[kxN],另外一个是[kxNx1]

0
回复
thinc
#6 回复于2020-05
181ws #5
是的,我计算的时候有一个元素是[kxN],另外一个是[kxNx1]

感谢

0
回复
如意_鸡蛋
#7 回复于2020-07

我加打印发现我报错的地方是在反向传播的时候,这个是因为什么呢?

print('=================================================')
loss.backward()
print('*******************************************')

报错位置对应就是在执行loss.backward()这行的时候

=================================================
E0730 10:24:33.639202 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.640527 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.641975 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.643215 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.644659 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.645845 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.647356 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.648751 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.650116 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.651299 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.652287 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.652773 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.810411 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.811486 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.812343 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.812958 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.813760 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.814363 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.815026 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.815652 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.816283 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.816867 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.817489 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
E0730 10:24:33.818078 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast
*******************************************

 

0
回复
如意_鸡蛋
#8 回复于2020-07
我加打印发现我报错的地方是在反向传播的时候,这个是因为什么呢? print('=================================================') loss.backward() print('*******************************************') 报错位置对应就是在执行loss.backward()这行的时候 ================================================= E0730 10:24:33.639202 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.640527 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.641975 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.643215 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.644659 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.645845 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.647356 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.648751 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.650116 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.651299 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.652287 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.652773 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.810411 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.811486 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.812343 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.812958 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.813760 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.814363 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.815026 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.815652 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.816283 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.816867 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.817489 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast E0730 10:24:33.818078 3692 elementwise_op_function.h:1068] Error, broadcast should not into w broadcast *******************************************  
展开

在本地运行就没有这个问题,是在AI Studio上才会有

0
回复
如意_鸡蛋
#9 回复于2020-07
在本地运行就没有这个问题,是在AI Studio上才会有

问题找到了,是因为维度不匹配,张量相加时报错的,但是在本地不报错,也不知道是什么原因

0
回复
thinc
#10 回复于2020-07

总结一下吧

Error, broadcast should not into w broadcast

基本都是两个运算的数据维度不匹配导致的

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户