From 748e204effe86559cc7db7ead2260a0a15915f05 Mon Sep 17 00:00:00 2001 From: sneaxiy Date: Mon, 25 Jun 2018 07:26:42 +0000 Subject: [PATCH] Revert "refine ZeroGradFunctor in activation_op.h" This reverts commit 1eeb11ef6190a7697cdce7914646a0d6163e7597. --- 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 497a2333382..91241519265 100644 --- a/paddle/fluid/operators/activation_op.h +++ b/paddle/fluid/operators/activation_op.h @@ -353,7 +353,7 @@ struct ZeroGradFunctor : public BaseActivationFunctor { template void operator()(Device d, X x, Out out, dOut dout, dX dx) const { - dx.device(d) = out.constant(static_cast(0)); + dx.device(d) = static_cast(0) / out; } }; -- GitLab