---
title: "ClikaRT::ops::celu"
sidebar_label: "celu"
description: "Continuously differentiable exponential linear unit. \\[ \\mathrm{celu}(x) = \\max(0, x) + \\min\\!\\bigl(0,\\; \\alpha\\,(e^{x/\\alpha}-1)\\bigr) \\] input the input tensor."
---

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

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

## celu() {#celu}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`celu`**([`Tensor`](../Tensor.md) `input`, `double` `alpha` `=` `1.0`)

</div>

Continuously differentiable exponential linear unit.

$$
\mathrm{celu}(x) = \max(0, x) + \min\!\bigl(0,\; \alpha\,(e^{x/\alpha}-1)\bigr)
$$

**Parameters**

- `input`: the input tensor.
- `alpha`: the negative-side scale; the formula is continuous at 0 for every `alpha`. Default `1.0`.

**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::celu(x, 0.5);
```

<div class="api-declared">

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

</div>
