From c7232b3e56c6d491c70c0ca6b80abb77a26d2ca4 Mon Sep 17 00:00:00 2001
From: Maxxhim <maxc2507@gmail.com>
Date: Fri, 3 Apr 2020 15:52:02 +0200
Subject: [PATCH] patch v2 relu

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

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