Skip to content

Commit bc7503c

Browse files
committed
modified error_info for maxout_op
1 parent 2b64a19 commit bc7503c

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,10 +71,10 @@ 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"
74+
"Input tensor of MaxoutOp"
7575
"should not be null.");
7676
PADDLE_ENFORCE(ctx->HasOutput("Out"),
77-
"Output(Out) of MaxoutOp should not be null.");
77+
"Output tensor of MaxoutOp should not be null.");
7878
auto in_x_dims = ctx->GetInputDim("X");
7979
int groups = ctx->Attrs().Get<int>("groups");
8080
// check groups > 1
@@ -90,9 +90,9 @@ class MaxOutOpGrad : public framework::OperatorWithKernel {
9090
public:
9191
using framework::OperatorWithKernel::OperatorWithKernel;
9292
void InferShape(framework::InferShapeContext* ctx) const override {
93-
PADDLE_ENFORCE(ctx->HasInput("X"), "Input(X) must not be null.");
93+
PADDLE_ENFORCE(ctx->HasInput("X"), "Input tensor must not be null.");
9494
PADDLE_ENFORCE(ctx->HasOutput(framework::GradVarName("X")),
95-
"Input(X@GRAD) should not be null.");
95+
"Output gradient tensor should not be null.");
9696
ctx->SetOutputDim(framework::GradVarName("X"), ctx->GetInputDim("X"));
9797
}
9898
};

0 commit comments

Comments
 (0)