Skip to content

Commit

Permalink
Copy gy
Browse files Browse the repository at this point in the history
  • Loading branch information
niboshi committed Aug 22, 2017
1 parent ff462a5 commit bca94b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions chainer/functions/activation/leaky_relu.py
Expand Up @@ -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:
Expand Down

0 comments on commit bca94b5

Please sign in to comment.