-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the div 0 error of matrix_power #49942
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
# The size of input should not be 0 | ||
input = fluid.data(name="input_4", shape=[1, 1, 0, 0], dtype="float32") | ||
self.assertRaises(ValueError, paddle.linalg.matrix_power, input, 2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个报错可能不是ValueError。导致你的单测挂了。
你可以在本地先删掉self.assertRaises(ValueError, paddle.linalg.matrix_power, input, 2)。再跑一次单测。这时,单测肯定报错,把PADDLE_ENFORCE_NE的The size of Input(X) should not be 0.给抛出来。
你看看报错的报错类型,应该不是ValueError。是什么,你重新填到self.assertRaises里。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个报错可能不是ValueError。导致你的单测挂了。 你可以在本地先删掉self.assertRaises(ValueError, paddle.linalg.matrix_power, input, 2)。再跑一次单测。这时,单测肯定报错,把PADDLE_ENFORCE_NE的The size of Input(X) should not be 0.给抛出来。 你看看报错的报错类型,应该不是ValueError。是什么,你重新填到self.assertRaises里。
查出来了~原因是这个报错出现在动态图下面
感谢提交代码。描述里最好介绍一下你的分析思路、解决思路。 |
Done~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* add zero size check in matrix_power_kernel_impl.h * add zero size check in matrix_power_kernel_impl.h * add zero size check in unittest * bug_fix * bug_fix * bug_fix * bug_fix * bug_fix * bug fix * bug_fix * bug_fix * add static check * delete the dy codes
PR types
Bug fixes
PR changes
OPs
Describe
related issues
Solution