diff --git a/paddle/fluid/operators/randperm_op.cc b/paddle/fluid/operators/randperm_op.cc index deafd651e90089542d2f50eea638ca8058d09c58..5d740a7407fb06258647756555c1941200ee0d00 100644 --- a/paddle/fluid/operators/randperm_op.cc +++ b/paddle/fluid/operators/randperm_op.cc @@ -31,7 +31,9 @@ class RandpermOp : public framework::OperatorWithKernel { int n = ctx->Attrs().Get("n"); PADDLE_ENFORCE_GT( n, 0, platform::errors::InvalidArgument( - "The input(n) of randperm op must be greater than 0.")); + "The input 'n' of randperm op should be greater than 0. " + "But received %d.", + n)); ctx->SetOutputDim("Out", framework::make_ddim({n})); }