Skip to content

Commit 85fe65a

Browse files
committed
modified error info for maxout op
1 parent bc7503c commit 85fe65a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

paddle/fluid/operators/maxout_op.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ 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 tensor of MaxoutOp"
75-
"should not be null.");
74+
"Input(X) of MaxoutOpshould not be null.");
7675
PADDLE_ENFORCE(ctx->HasOutput("Out"),
77-
"Output tensor of MaxoutOp should not be null.");
76+
"Output(Out) of MaxoutOp should not be null.");
7877
auto in_x_dims = ctx->GetInputDim("X");
7978
int groups = ctx->Attrs().Get<int>("groups");
8079
// check groups > 1
@@ -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 tensor 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-
"Output gradient tensor 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)