megengine.functional.nn.gelu

gelu(x)[源代码]

Applies the element-wise function:

\[\text{gelu}(x) = x\Phi(x)\]

where \(\Phi(x)\) is the Cumulative Distribution Function for Gaussian Distribution.