# tf.nn.leaky_relu

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/nn/leaky_relu) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/nn_ops.py#L2840-L2862) |

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 />