From f6c1128ff9979fb5abf0a6ab4be19a8d65296fee Mon Sep 17 00:00:00 2001 From: Maxxhim <maxc2507@gmail.com> Date: Fri, 3 Apr 2020 15:50:54 +0200 Subject: [PATCH] patch v1 relu --- functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.py b/functions.py index ae4d9c5..f27b60d 100644 --- a/functions.py +++ b/functions.py @@ -385,7 +385,7 @@ class ReLu(_Function): # TODO: Implement the derivative dx for this opetation and add the # result of the chain rule on self.dx. ####################################################################### - self.dx = 0 if self.x.data <= 0 else 1 + self.dx = grad * 0 if self.x.data <= 0 else 1 ####################################################################### # --------------------------- END OF YOUR CODE ------------------------ ####################################################################### -- GitLab