Skip to main content

ClikaRT::ops::silu

function

silu()​

Tensor silu(Tensor input)

Sigmoid linear unit (swish).

silu(x)=x σ(x)=x1+e−x\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 input.

auto y = ClikaRT::ops::silu(x);

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