We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b586c90 commit 040088fCopy full SHA for 040088f
neural_network/activation_functions/mish.py
@@ -7,6 +7,7 @@
7
"""
8
9
import numpy as np
10
+from softplus import softplus
11
12
13
def mish(vector: np.ndarray) -> np.ndarray:
@@ -30,7 +31,7 @@ def mish(vector: np.ndarray) -> np.ndarray:
30
31
array([-0.00092952, -0.15113318, 0.33152014, -0.04745745])
32
33
- return vector * np.tanh(np.log(1 + np.exp(vector)))
34
+ return vector * np.tanh(softplus(vector))
35
36
37
if __name__ == "__main__":
0 commit comments