Skip to content

Commit f15def6

Browse files
authored
Merge pull request #12945 from jerrywgz/fix_maxout
modified error_info for maxout_op
2 parents 239a838 + 85fe65a commit f15def6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

paddle/fluid/operators/maxout_op.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ class MaxOutOp : public framework::OperatorWithKernel {
7171
using framework::OperatorWithKernel::OperatorWithKernel;
7272
void InferShape(framework::InferShapeContext* ctx) const override {
7373
PADDLE_ENFORCE(ctx->HasInput("X"),
74-
"Input(X) of MaxoutOp"
75-
"should not be null.");
74+
"Input(X) of MaxoutOpshould not be null.");
7675
PADDLE_ENFORCE(ctx->HasOutput("Out"),
7776
"Output(Out) of MaxoutOp should not be null.");
7877
auto in_x_dims = ctx->GetInputDim("X");
@@ -90,9 +89,10 @@ class MaxOutOpGrad : public framework::OperatorWithKernel {
9089
public:
9190
using framework::OperatorWithKernel::OperatorWithKernel;
9291
void InferShape(framework::InferShapeContext* ctx) const override {
93-
PADDLE_ENFORCE(ctx->HasInput("X"), "Input(X) must not be null.");
92+
PADDLE_ENFORCE(ctx->HasInput("X"),
93+
"Input(X) of MaxOutOpGrad must not be null.");
9494
PADDLE_ENFORCE(ctx->HasOutput(framework::GradVarName("X")),
95-
"Input(X@GRAD) should not be null.");
95+
"Output(Grad@X) of MaxOutOpGrad should not be null.");
9696
ctx->SetOutputDim(framework::GradVarName("X"), ctx->GetInputDim("X"));
9797
}
9898
};

0 commit comments

Comments
 (0)