diff --git a/paddle/operators/mean_op.h b/paddle/operators/mean_op.h index a89cb422f9b296dba6eb5358043f73d00aefc5d3..e712dee6a785749e51be7b233e85dbf39c835218 100644 --- a/paddle/operators/mean_op.h +++ b/paddle/operators/mean_op.h @@ -47,7 +47,7 @@ public: T ig_size = (T)framework::product(IG->dims()); - EigenVector::Flatten(*IG).device(*(context.GetEigenDevice())) = + EigenVector::Flatten(*IG).device(context.GetEigenDevice()) = EigenScalar::From(*OG) / ig_size; } };