Skip to content

Commit f7597d9

Browse files
Merge pull request #443 from Sleort/patch-1
Slightly faster softplus
2 parents 7087954 + 7eea8b8 commit f7597d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/activations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ julia> softplus(16f0)
615615
16.0f0
616616
```
617617
"""
618-
softplus(x) = log1p(exp(-abs(x))) + max(x, 0)
618+
softplus(x) = log1p(exp(-abs(x))) + relu(x)
619619

620620
"""
621621
logcosh(x)

0 commit comments

Comments
 (0)