File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class SequenceExpandOp : public framework::OperatorWithKernel {
49
49
auto & y_lod = y_var->Get <LoDTensor>().lod ();
50
50
51
51
PADDLE_ENFORCE_LE (x_lod.size (), 1 ,
52
- " Number of lod level of Input(X) should not be "
52
+ " Level number of Input(X)'s lod should not be "
53
53
" greater than 1." );
54
54
PADDLE_ENFORCE_GT (y_lod.size (), 0 ,
55
55
" Level number of Input(Y)'s lod should be "
@@ -64,11 +64,10 @@ class SequenceExpandOp : public framework::OperatorWithKernel {
64
64
if (ref_level == -1 ) ref_level = y_lod.size () - 1 ;
65
65
66
66
if (x_lod.size () > 0 ) {
67
- PADDLE_ENFORCE (
68
- x_lod.size () == 0 || x_lod[0 ].size () == y_lod[ref_level].size (),
69
- " Level number of Input(X)'s lod should be 0. Otherwise "
70
- " size of Input(X)'s first level lod should be equal to "
71
- " size of Input(Y)'s lod of referred level." );
67
+ PADDLE_ENFORCE (x_lod[0 ].size () == y_lod[ref_level].size (),
68
+ " Level number of Input(X)'s lod could be 0. Otherwise "
69
+ " size of Input(X)'s first level lod should be equal to "
70
+ " size of Input(Y)'s referred level lod." );
72
71
}
73
72
74
73
int64_t out_first_dim = 0 ;
You can’t perform that action at this time.
0 commit comments