leaky_relu

ivy.neural_net_functional.activations.leaky_relu(x, alpha=0.2, f=None)[source]

Applies the leaky rectified linear unit function element-wise.

Parameters
  • x (array) – Input array.

  • alpha (float) – Negative slope for ReLU

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

The input array with leaky relu applied element-wise.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty