diff --git a/paddle/operators/pad_op.cc b/paddle/operators/pad_op.cc index ef678cf3d359fe8c3b8d76b3fd443549b79b616a..449463c8308a75230e7177dd09fb542b95963d91 100644 --- a/paddle/operators/pad_op.cc +++ b/paddle/operators/pad_op.cc @@ -95,7 +95,6 @@ class PadOpGrad : public framework::OperatorWithKernel { "Input(Out@GRAD) should not be null"); auto x_dims = ctx.Input("X")->dims(); auto *x_grad = ctx.Output(framework::GradVarName("X")); - PADDLE_ENFORCE_NOT_NULL(x_grad, "Output(X@GRAD) should not be null"); x_grad->Resize(x_dims); }