ResNet/resnet_model.py
def gelu_fn(x, name):
  """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.
  """
  with tf.compat.v1.name_scope(name):
    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.
  
Gaussian Error Linear Unit.
This is a smoother version of the RELU.
Gaussian Error Linear Unit . This is a smoother version of the RELU .
def gelu_fn(x, name):
  with tf.compat.v1.name_scope(name):
    cdf = 0.5 * (1.0 + tf.tanh(
        (np.sqrt(2 / np.pi) * (x + 0.044715 * tf.pow(x, 3)))))
    return x * cdf
def gelu_fn ( x , name ) : with tf . compat . v1 . name_scope ( name ) : 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.
Gaussian Error Linear Unit .
"""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.
  """
`x` with the GELU activation applied.
` x ` with the GELU activation applied .
x
float Tensor to perform activation.
float Tensor to perform activation .
name