未知错误定位
收藏
跑程序的时候不停报错:elementwise_op_function.h:1096] Error, broadcast should not into w broadcast
但是程序没停止。
怎么定位这个错误出在哪儿?
0
收藏
请登录后评论
你翻译一下就知道了
找找你的elementwise api,看看你运算的数据和axis是否为1
谢谢。我后来发现了,多了一个轴
数据多了一个维度吗?想记录一下这种问题~
是的,我计算的时候有一个元素是[kxN],另外一个是[kxNx1]
感谢
我加打印发现我报错的地方是在反向传播的时候,这个是因为什么呢?
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上才会有
问题找到了,是因为维度不匹配,张量相加时报错的,但是在本地不报错,也不知道是什么原因
总结一下吧
Error, broadcast should not into w broadcast
基本都是两个运算的数据维度不匹配导致的