Skip to content
Snippets Groups Projects
Commit 4a8a229b authored by Maxxhim's avatar Maxxhim
Browse files

patch v5 relu

parent b82bc6c5
No related branches found
No related tags found
No related merge requests found
......@@ -385,8 +385,9 @@ class ReLu(_Function):
# TODO: Implement the derivative dx for this opetation and add the
# result of the chain rule on self.dx.
#######################################################################
is_sup = self.x.data > 0
self.dx = grad * is_sup
# is_sup = self.x.data > 0
# self.dx = grad * is_sup
self.dx = grad * (self.x.data > 0)
#######################################################################
# --------------------------- END OF YOUR CODE ------------------------
#######################################################################
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment