(leak=0.1)
return lambda x: tf.maximum(x, leak * x)
Leaky ReLU activation function.

  Args:
    leak: float. Slope for the negative part of the leaky ReLU function.
        Defaults to 0.1.

  Returns:
    A lambda computing the leaky ReLU function with the specified slope.
Leaky ReLU activation function.
Leaky ReLU activation function .
def leaky_relu(leak=0.1):
  """Leaky ReLU activation function.

  Args:
    leak: float. Slope for the negative part of the leaky ReLU function.
        Defaults to 0.1.

  Returns:
    A lambda computing the leaky ReLU function with the specified slope.
  """
  return lambda x: tf.maximum(x, leak * x)
def leaky_relu ( leak = 0.1 ) : return lambda x : tf . maximum ( x , leak * x )