From 6cb97d04be7e67e5edd5c6c02c8227a1c1868f7f Mon Sep 17 00:00:00 2001
From: Maxxhim <maxc2507@gmail.com>
Date: Fri, 3 Apr 2020 18:12:35 +0200
Subject: [PATCH] patch v6 relu

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

diff --git a/functions.py b/functions.py
index cf86c0b..604b225 100644
--- a/functions.py
+++ b/functions.py
@@ -387,7 +387,7 @@ class ReLu(_Function):
         #######################################################################
         # is_sup = self.x.data > 0
         # self.dx = grad * is_sup
-        self.dx = grad * (self.x.data > 0)
+        self.dx = (self.x.data > 0) * grad
         #######################################################################
         # --------------------------- END OF YOUR CODE ------------------------
         #######################################################################
-- 
GitLab