<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/ops/nn_impl.py#L431-L484) |

Computes the SiLU or Swish activation function: `x * sigmoid(beta * x)`.

#### View aliases


**Main aliases**

[`tf.nn.swish`](https://www.tensorflow.org/api_docs/python/tf/nn/silu)

<br />

    tf.nn.silu(
        features, beta=1.0
    )

beta : Hyperparameter for Swish activation function. Default value 1.0.

The SiLU activation function was introduced in "Gaussian Error Linear Units
(GELUs)" [Hendrycks et al. 2016](https://arxiv.org/abs/1606.08415) and
"Sigmoid-Weighted Linear Units for Neural Network Function Approximation in
Reinforcement Learning"
[Elfwing et al. 2017](https://arxiv.org/abs/1702.03118) and was independently
discovered (and called swish) in "Searching for Activation Functions"
[Ramachandran et al. 2017](https://arxiv.org/abs/1710.05941)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `features` | A `Tensor` representing preactivation values. |
| `beta` | A 'Tensor' representing value of beta hyperparameter. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The activation value. ||

<br />