From bca94b57e2236280bc87be624274e284932d600b Mon Sep 17 00:00:00 2001 From: niboshi Date: Tue, 22 Aug 2017 17:31:34 +0900 Subject: [PATCH] Copy gy --- chainer/functions/activation/leaky_relu.py | 1 + 1 file changed, 1 insertion(+) 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: