# tf.keras.layers.ReLU

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/layers/ReLU) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/layers/advanced_activations.py#L273-L332) |

Rectified Linear Unit activation function.

Inherits From: [`Layer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/layers/Layer)

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.keras.layers.ReLU`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/ReLU), \`tf.compat.v2.keras.layers.ReLU\`

<br />

    tf.keras.layers.ReLU(
        max_value=None, negative_slope=0, threshold=0, **kwargs
    )

With default values, it returns element-wise `max(x, 0)`.

Otherwise, it follows:
`f(x) = max_value` for `x >= max_value`,
`f(x) = x` for `threshold <= x < max_value`,
`f(x) = negative_slope * (x - threshold)` otherwise.

#### Input shape:

Arbitrary. Use the keyword argument `input_shape`
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.

#### Output shape:

Same shape as the input.

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `max_value` | Float \>= 0. Maximum activation value. |
| `negative_slope` | Float \>= 0. Negative slope coefficient. |
| `threshold` | Float. Threshold value for thresholded activation. |

<br />