()
return Fn('Gelu', lambda x: x * 0.5 * (1.0 + fastmath.erf(x / jnp.sqrt(2.0))))
r"""Returns a layer that computes the Gaussian Error Linear Unit function.

  .. math::
      f(x) = \frac{x}{2} \cdot (1 + \hbox{erf}(\frac{x}{\sqrt{2}}))
r"""Returns a layer that computes the Gaussian Error Linear Unit function.
r Returns a layer that computes the Gaussian Error Linear Unit function .
def Gelu():
  r"""Returns a layer that computes the Gaussian Error Linear Unit function.

  .. math::
      f(x) = \frac{x}{2} \cdot (1 + \hbox{erf}(\frac{x}{\sqrt{2}}))
  """
  return Fn('Gelu', lambda x: x * 0.5 * (1.0 + fastmath.erf(x / jnp.sqrt(2.0))))
def Gelu ( ) : return Fn ( 'Gelu' , lambda x : x * 0.5 * ( 1.0 + fastmath . erf ( x / jnp . sqrt ( 2.0 ) ) ) )