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

patch v2 relu

parent f6c1128f
No related branches found
No related tags found
No related merge requests found
......@@ -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 ------------------------
#######################################################################
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment