diff --git a/functions.py b/functions.py index ae4d9c5427f151de2aaa3656bfb991b01f323e5f..f27b60dc371646e978224366260494bd66333288 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 ------------------------ #######################################################################