Skip to main content

ClikaRT::ops::quick_gelu

function

quick_gelu()​

Tensor quick_gelu(Tensor input)

QuickGELU: the sigmoid GELU approximation.

quick_gelu(x)=x σ(1.702 x)\mathrm{quick\_gelu}(x) = x\,\sigma(1.702\,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::quick_gelu(x);

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