Machine learning building blocks
SiLU (swish)
ml.siluAlso called silu, swish, sigmoid linear unit, swish1
x times its logistic sigmoid, x σ(x). Swish with β = 1.
Notation
input
x ∈ ℝ
Result: the activation
scalar
Worked examples
Each result is solved exactly and confirmed by two independent computations.
Given
Result
Given
Result
≈ 0.73105857863
Given
Result
≈ -0.26894142137
Given
Result
≈ 1.76159415596
Common mistakes
Returns σ(x) without the factor x
The gate σ(x) is returned instead of x σ(x).
Fix: Multiply the sigmoid by x.
Sources
Elfwing et al. 2018
Elfwing, Stefan; Uchibe, Eiji; Doya, Kenji. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Networks 107: 3-11, 2018. doi:10.1016/j.neunet.2017.12.012
Hendrycks and Gimpel 2016
Hendrycks, Dan; Gimpel, Kevin. Gaussian Error Linear Units (GELUs). arXiv:1606.08415, 2016.