Deep-ML is a free, open-source machine learning challenge platform. Practice ML coding problems, work with real datasets in labs, and learn through interactive articles.
Please enable JavaScript to use the full platform.
Implement the Swish activation function, a self-gated activation function that has shown superior performance in deep neural networks compared to ReLU. Your task is to compute the Swish value for a given input.
swish(1)
0.7311
For x = 1, the Swish activation is calculated as Swish(x)=x×σ(x)Swish(x) = x \times \sigma(x)Swish(x)=x×σ(x), where σ(x)=11+e−x\sigma(x) = \frac{1}{1 + e^{-x}}σ(x)=1+e−x1. Substituting the value, Swish(1)=1×11+e−1=0.7311Swish(1) = 1 \times \frac{1}{1 + e^{-1}} = 0.7311Swish(1)=1×1+e−11=0.7311.
Haleshot