---
title: "ClikaRT::ops::relu6"
sidebar_label: "relu6"
description: "ReLU capped at 6. \\[ \\mathrm{relu6}(x) = \\mathrm{clamp}(x,\\; 0,\\; 6) \\] ClikaRT::Error when the input's dtype is not served for this operation (the machine-readable reason rides code_name())."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## relu6() {#relu6}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`relu6`**([`Tensor`](../Tensor.md) `input`)

</div>

ReLU capped at 6.

$$
\mathrm{relu6}(x) = \mathrm{clamp}(x,\; 0,\; 6)
$$

**Throws**

- `ClikaRT::Error`: when the input's dtype is not served for this operation (the machine-readable reason rides `code_name()`).

**Returns:** a new tensor, same shape and dtype as `input`.

```cpp
auto y = ClikaRT::ops::relu6(x);
```

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 990

</div>
