# tf.nn.leaky_relu

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/ops/nn_ops.py#L3662-L3694) |

Compute the Leaky ReLU activation function.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.nn.leaky_relu`](https://www.tensorflow.org/api_docs/python/tf/nn/leaky_relu)

<br />

    tf.nn.leaky_relu(
        features, alpha=0.2, name=None
    )

Source: [Rectifier Nonlinearities Improve Neural Network Acoustic Models.
AL Maas, AY Hannun, AY Ng - Proc. ICML, 2013](https://ai.stanford.edu/%7Eamaas/papers/relu_hybrid_icml2013_final.pdf).

<br />

<br />

<br />

| ## Args ||
|---|---|
| `features` | A `Tensor` representing preactivation values. Must be one of the following types: `float16`, `float32`, `float64`, `int32`, `int64`. |
| `alpha` | Slope of the activation function at x \< 0. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

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

<br />

<br />

<br />

<br />

| ## References ||
|---|---|
| Rectifier Nonlinearities Improve Neural Network Acoustic Models: [Maas et al., 2013](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.693.1422) ([pdf](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.693.1422&rep=rep1&type=pdf)) ||

<br />