@@ -27,9 +27,7 @@ class SeqExpandOp : public framework::OperatorWithKernel {
27
27
void InferShape (framework::InferShapeContext* ctx) const override {
28
28
PADDLE_ENFORCE (ctx->HasInput (" X" ));
29
29
PADDLE_ENFORCE (ctx->HasOutput (" Out" ));
30
- PADDLE_ENFORCE (
31
- ctx->HasInput (" Y" ),
32
- " Input(Y) of SeqExpandOp should not be null while repeat == 0." );
30
+ PADDLE_ENFORCE (ctx->HasInput (" Y" ));
33
31
framework::DDim out_dim;
34
32
out_dim = ctx->GetInputDim (" Y" );
35
33
ctx->ShareLoD (" Y" , " Out" );
@@ -43,14 +41,14 @@ class SeqExpandOpMaker : public framework::OpProtoAndCheckerMaker {
43
41
framework::OpAttrChecker* op_checker)
44
42
: OpProtoAndCheckerMaker(proto, op_checker) {
45
43
AddInput (" X" ,
46
- " (Tensor or LoDTensor) The input('X' ) of this operator can be a "
44
+ " (Tensor or LoDTensor) The input(X ) of this operator can be a "
47
45
" LoDTensor or a base Tensor." );
48
46
AddInput (" Y" ,
49
- " (LoDTensor)The reference input('Y' ) of seq_expand op."
47
+ " (LoDTensor)The reference input(Y ) of seq_expand op."
50
48
" It must be a LoDTensor with k-level(k>0)."
51
- " Input (X) will be expanded according to LOD of input(Y)."
52
- " The element numbers of last level in input('Y' ) "
53
- " must be equal to dims[0] of input('X' )." );
49
+ " The input (X) will be expanded according to LOD of input(Y)."
50
+ " The element numbers of last level in input(Y ) "
51
+ " must be equal to dims[0] of input(X )." );
54
52
AddOutput (" Out" ,
55
53
" (LodTensor)The output of seq_expand op."
56
54
" The lod of output will be as same as input(Y)'s lod." );
@@ -133,7 +131,7 @@ class SeqExpandOpGrad : public framework::OperatorWithKernel {
133
131
PADDLE_ENFORCE (ctx->HasInput (" X" ));
134
132
PADDLE_ENFORCE (ctx->HasInput (" Out" ));
135
133
PADDLE_ENFORCE (ctx->HasInput (framework::GradVarName (" Out" )),
136
- " Input (Out@GRAD) should not be null" );
134
+ " The input (Out@GRAD) should not be null" );
137
135
auto x_dims = ctx->GetInputDim (" X" );
138
136
auto x_grad_name = framework::GradVarName (" X" );
139
137
if (ctx->HasOutput (x_grad_name)) {
0 commit comments