Skip to content

Commit

Permalink
Bugfix: return float for relu
Browse files Browse the repository at this point in the history
  • Loading branch information
dantp-ai committed Mar 22, 2024
1 parent 1b9cfe1 commit b35d173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minitorch/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def relu(x: float) -> float:
(See https://en.wikipedia.org/wiki/Rectifier_(neural_networks) .)
"""

return x if x > 0.0 else 0
return x if x > 0.0 else 0.0


EPS = 1e-6
Expand Down

0 comments on commit b35d173

Please sign in to comment.