Skip to content
fn

gelu_exact_op

→TensorImplPtr
int gelu_exact_op(const int & a)

Exact GeLU y=0.5 x (1+erf(x/2))y = 0.5\,x\,(1 + \mathrm{erf}(x/\sqrt{2})).

See Also

gelu_op : Tanh-approximation variant (default). GeluExactBackward : Autograd node implementing the gradient rule.

Parameters

aTensorImplPtr
Input tensor.

Returns

TensorImplPtr

Output tensor with the same shape as a.