def gelu(x):
    'Gaussian Error Linear Unit.\n    This is a smoother version of the RELU.\n    Original paper: https://arxiv.org/abs/1606.08415\n    Args:\n        x: float Tensor to perform activation.\n    Returns:\n        `x` with the GELU activation applied.\n    '
    cdf = (0.5 * (1.0 + tf.tanh((np.sqrt((2 / np.pi)) * (x + (0.044715 * tf.pow(x, 3)))))))
    return (x * cdf)
Gaussian Error Linear Unit.
This is a smoother version of the RELU.
Original paper: https://arxiv.org/abs/1606.08415
Args:
    x: float Tensor to perform activation.
Returns:
    `x` with the GELU activation applied.
def gelu(x):
    'Gaussian Error Linear Unit.\n    This is a smoother version of the RELU.\n    Original paper: https://arxiv.org/abs/1606.08415\n    Args:\n        x: float Tensor to perform activation.\n    Returns:\n        `x` with the GELU activation applied.\n    '
    cdf = (0.5 * (1.0 + tf.tanh((np.sqrt((2 / np.pi)) * (x + (0.044715 * tf.pow(x, 3)))))))
    return (x * cdf)