From b82bc6c52fbe541ff745782c0c6c35e955bb9e1e Mon Sep 17 00:00:00 2001
From: Maxxhim <maxc2507@gmail.com>
Date: Fri, 3 Apr 2020 17:38:07 +0200
Subject: [PATCH] patch v4 relu

---
 functions.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions.py b/functions.py
index a87d351..f19feee 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.
         #######################################################################
-        is_sup = 0 if self.x.data <= 0 else 1
+        is_sup = self.x.data > 0
         self.dx = grad * is_sup
         #######################################################################
         # --------------------------- END OF YOUR CODE ------------------------
-- 
GitLab