<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/ops/nn.py#L594-L619) |

Scaled Exponential Linear Unit (SELU) activation function.

#### View aliases


**Main aliases**

[`tf.keras.ops.nn.selu`](https://www.tensorflow.org/api_docs/python/tf/keras/ops/selu)

<br />

    tf.keras.ops.selu(
        x
    )

#### It is defined as:

`f(x) = scale * alpha * (exp(x) - 1.) for x < 0`,
`f(x) = scale * x for x >= 0`.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor with the same shape as `x`. ||

<br />

#### Example:

    x = np.array([-1., 0., 1.])
    x_selu = keras.ops.selu(x)
    print(x_selu)
    array([-1.11133055, 0., 1.05070098], shape=(3,), dtype=float64)