# tf.nn.relu6

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/nn/relu6) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/nn_ops.py#L2780-L2797) |

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), \`tf.compat.v2.nn.relu6\`

<br />

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

Source: [Convolutional Deep Belief Networks on CIFAR-10. A.
Krizhevsky](http://www.cs.utoronto.ca/%7Ekriz/conv-cifar10-aug2010.pdf)

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