From 91ba75000c9387f648f823a43242acd4e865026e Mon Sep 17 00:00:00 2001 From: zhoukunsheng Date: Fri, 29 Mar 2019 15:54:54 +0800 Subject: [PATCH] fix type conversion problem in rsqrt functor --- paddle/fluid/operators/activation_op.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/activation_op.h b/paddle/fluid/operators/activation_op.h index 1839c7e9bce..292505ae6c3 100644 --- a/paddle/fluid/operators/activation_op.h +++ b/paddle/fluid/operators/activation_op.h @@ -477,7 +477,7 @@ struct RsqrtGradFunctor : public BaseActivationFunctor { template void operator()(Device d, X x, Out out, dOut dout, dX dx) const { - dx.device(d) = static_cast(-0.5) * dout * out.pow(3); + dx.device(d) = static_cast(-0.5) * dout * out * out * out; } }; -- GitLab