(input_tensor)
return input_tensor * cdf
Gaussian Error Linear Unit.

  This is a smoother version of the RELU.
  Original paper: https://arxiv.org/abs/1606.08415

  Args:
    input_tensor: float Tensor to perform activation.

  Returns:
    `input_tensor` with the GELU activation applied.
Gaussian Error Linear Unit.
Gaussian Error Linear Unit .
def gelu(input_tensor):
  """Gaussian Error Linear Unit.

  This is a smoother version of the RELU.
  Original paper: https://arxiv.org/abs/1606.08415

  Args:
    input_tensor: float Tensor to perform activation.

  Returns:
    `input_tensor` with the GELU activation applied.
  """
  cdf = 0.5 * (1.0 + tf.erf(input_tensor / tf.sqrt(2.0)))
  return input_tensor * cdf
def gelu ( input_tensor ) : cdf = 0.5 * ( 1.0 + tf . erf ( input_tensor / tf . sqrt ( 2.0 ) ) ) return input_tensor * cdf