Skip to main content

ClikaRT::ops::quick_gelu

function

quick_gelu()

Tensor quick_gelu(Tensor x)

QuickGELU: the sigmoid GELU approximation.

quick_gelu(x)=xσ(1.702x)\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 x.

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

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