diff --git a/paddle/operators/norm_op.cc b/paddle/operators/norm_op.cc index 3835da630d2142b20134b6554f268824d4718752..d23805da8612ae1f28a0c535e428e27478ea1036 100644 --- a/paddle/operators/norm_op.cc +++ b/paddle/operators/norm_op.cc @@ -68,6 +68,9 @@ class NormOp : public framework::OperatorWithKernel { PADDLE_ENFORCE(ctx->HasInput("X"), "Input(X) of NormOp" "should not be null."); + PADDLE_ENFORCE(ctx->HasInput("Scale"), + "Input(Scale) of NormOp" + "should not be null."); PADDLE_ENFORCE(ctx->HasOutput("Out"), "Output(Out) of NormOp should not be null."); auto in_x_dims = ctx->GetInputDim("X");