mlx.nn.gelu#
- mlx.nn.gelu(x)#
Applies the Gaussian Error Linear Units function.
\[\begin{split}\\textrm{GELU}(x) = x * \Phi(x)\end{split}\]where \(\Phi(x)\) is the Gaussian CDF.
See also
gelu_approx()
andgelu_fast_approx()
for faster approximations.