# tf.nn.relu6

<br />

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

Computes Rectified Linear 6: `min(max(features, 0), 6)`.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.nn.relu6(
        features, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `features` | A `Tensor` with type `float`, `double`, `int32`, `int64`, `uint8`, `int16`, or `int8`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` with the same type as `features`. ||

<br />

<br />

<br />

<br />

| ## References ||
|---|---|
| Convolutional Deep Belief Networks on CIFAR-10: Krizhevsky et al., 2010 ([pdf](http://www.cs.utoronto.ca/%7Ekriz/conv-cifar10-aug2010.pdf)) ||

<br />