Skip to main content

ClikaRT::ops::celu

function

celu()

Tensor celu(Tensor x, double alpha = 1.0)

Continuously differentiable exponential linear unit.

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

Parameters

  • x: 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 x.

auto y = ClikaRT::ops::celu(x, 0.5);

Declared in ClikaRT/compute/ops.h, line 721