diff --git a/chainer/functions/activation/leaky_relu.py b/chainer/functions/activation/leaky_relu.py index 81282cfd4ecb..86a043a0329f 100644 --- a/chainer/functions/activation/leaky_relu.py +++ b/chainer/functions/activation/leaky_relu.py @@ -65,6 +65,7 @@ def __init__(self, x, y, slope): def forward_cpu(self, inputs): gy, = inputs + gy = gy.copy() if self.slope >= 0: gy[self.y < 0] *= self.slope else: