未验证 提交 01659a69 编写于 作者: H HappyAngel 提交者: GitHub

Polish operators error message in average_accumlate OP (#27268)

* fix op print error info problem. test=develop

* fix build error

* fix format

* fix error msg info

* fix format
上级 3c117179
......@@ -54,9 +54,13 @@ class AverageAccumulatesKernel : public framework::OpKernel<T> {
float average_window = ctx.Attr<float>("average_window");
int64_t max_average_window = ctx.Attr<int64_t>("max_average_window");
int64_t min_average_window = ctx.Attr<int64_t>("min_average_window");
PADDLE_ENFORCE_LE(min_average_window, max_average_window,
"min_average_window shouldn't be larger than "
"max_average_window");
PADDLE_ENFORCE_LE(
min_average_window, max_average_window,
platform::errors::InvalidArgument(
"The min_average_window > "
"max_average_window is not right, min_average_window is %ld, "
"max_average_window is %ld.",
min_average_window, max_average_window));
// Get inputs
auto* param = ctx.Input<Tensor>("param");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册