diff --git a/paddle/fluid/operators/sequence_expand_op.cc b/paddle/fluid/operators/sequence_expand_op.cc index 2c88a53bc7f0092b0fa22891be0588ca7a08f49a..d4bf6034ed56f922f70ba90dfa3ea1a9ec91d319 100644 --- a/paddle/fluid/operators/sequence_expand_op.cc +++ b/paddle/fluid/operators/sequence_expand_op.cc @@ -49,7 +49,7 @@ class SequenceExpandOp : public framework::OperatorWithKernel { auto& y_lod = y_var->Get().lod(); PADDLE_ENFORCE_LE(x_lod.size(), 1, - "Number of lod level of Input(X) should not be " + "Level number of Input(X)'s lod should not be " "greater than 1."); PADDLE_ENFORCE_GT(y_lod.size(), 0, "Level number of Input(Y)'s lod should be " @@ -64,11 +64,10 @@ class SequenceExpandOp : public framework::OperatorWithKernel { if (ref_level == -1) ref_level = y_lod.size() - 1; if (x_lod.size() > 0) { - PADDLE_ENFORCE( - x_lod.size() == 0 || x_lod[0].size() == y_lod[ref_level].size(), - "Level number of Input(X)'s lod should be 0. Otherwise " - "size of Input(X)'s first level lod should be equal to " - "size of Input(Y)'s lod of referred level."); + PADDLE_ENFORCE(x_lod[0].size() == y_lod[ref_level].size(), + "Level number of Input(X)'s lod could be 0. Otherwise " + "size of Input(X)'s first level lod should be equal to " + "size of Input(Y)'s referred level lod."); } int64_t out_first_dim = 0;