Fix the formate of raising error in randperm op (#30108)

* fix the formate of raising error in randperm op
revert-31562-mean
cc 5 years ago committed by GitHub
parent ab04997846
commit 9f34374b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,7 +31,9 @@ class RandpermOp : public framework::OperatorWithKernel {
int n = ctx->Attrs().Get<int>("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}));
}

Loading…
Cancel
Save