未知错误定位
181ws 发布于2020-05-25 00:33 浏览:357 回复:9
0
收藏
快速回复

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

但是程序没停止。

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

收藏
点赞
0
个赞
共9条回复 最后由鹿鼎记肯定回复于2020-07-31 07:24
#10鹿鼎记肯定回复于2020-07-31 07:24:03

总结一下吧

Error, broadcast should not into w broadcast

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

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

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

0
#8如意_鸡蛋回复于2020-07-30 10:29:04
#7 如意_鸡蛋回复
我加打印发现我报错的地方是在反向传播的时候,这个是因为什么呢? 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
#7如意_鸡蛋回复于2020-07-30 10:27:26

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

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
#6鹿鼎记肯定回复于2020-05-25 17:36:00
#5 181ws回复
是的,我计算的时候有一个元素是[kxN],另外一个是[kxNx1]

感谢

0
#5181ws回复于2020-05-25 11:42:34
#4 鹿鼎记肯定回复
数据多了一个维度吗?想记录一下这种问题~

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

0
#4鹿鼎记肯定回复于2020-05-25 11:20:29
#3 181ws回复
谢谢。我后来发现了,多了一个轴

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

0
#3181ws回复于2020-05-25 10:21:59
#2 鹿鼎记肯定回复
你翻译一下就知道了[图片] 找找你的elementwise  api,看看你运算的数据和axis是否为1
展开

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

0
#2鹿鼎记肯定回复于2020-05-25 10:16:33

你翻译一下就知道了

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

0
TOP
切换版块