未验证 提交 bf461fa5 编写于 作者: L lilong12 提交者: GitHub

Improving error report message for sequence_expand op (#27245)

* improve err report, test=develop
上级 bc3e9ba1
......@@ -92,9 +92,11 @@ class SequenceExpandKernel : public framework::OpKernel<T> {
auto& x_lod = x->lod();
auto& y_lod = y->lod();
PADDLE_ENFORCE_EQ(y_lod.empty(), false,
"Input(Y) Tensor of SequenceExpandOp does not contain "
"LoD information.");
PADDLE_ENFORCE_EQ(
y_lod.empty(), false,
platform::errors::InvalidArgument(
"Input(Y) Tensor of SequenceExpandOp does not contain "
"LoD information."));
if (ref_level == -1) ref_level = y_lod.size() - 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册