import tensorflow as tf

  alpha: A scalar, slope of positive section.

  Returns
  -------
  A tensor.
  """
  res = tf.nn.elu(x)
  if alpha == 1:
    return res
  else:
    return tf.where(x > 0, res, alpha * res)


def relu(x, alpha=0., max_value=None):
  """Rectified linear unit.
  With default values, it returns element-wise `max(x, 0)`.

  Parameters
  ----------
  x: A tensor or variable.
