Skip to main content

ClikaRT::ops::silu

function

silu()

Tensor silu(Tensor x)

Sigmoid linear unit (swish).

silu(x)=xσ(x)=x1+ex\mathrm{silu}(x) = x\,\sigma(x) = \frac{x}{1 + e^{-x}}

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::silu(x);

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