diff --git a/paddle/operators/uniform_random_op.cc b/paddle/operators/uniform_random_op.cc index 877bcb9d4f8d9c525d691fd96242dd3dd58a81b2..405b84b76d2e24db25d2ff16e99495f2f132ef09 100644 --- a/paddle/operators/uniform_random_op.cc +++ b/paddle/operators/uniform_random_op.cc @@ -50,7 +50,7 @@ class UniformRandomOp : public framework::OperatorWithKernel { void InferShape(const framework::InferShapeContext& ctx) const override { PADDLE_ENFORCE(GetAttr("min") < GetAttr("max"), "uniform_random's min must less then max"); - auto tensor = ctx.Output(0); + auto* tensor = ctx.Output(0); auto dims = GetAttr>("dims"); tensor->Resize(framework::make_ddim(dims)); }