• Computes leaky rectified linear element-wise.

    See http://web.stanford.edu/~awni/papers/relu_hybrid_icml2013_final.pdf

    const x = tf.tensor1d([-1, 2, -3, 4]);

    x.leakyRelu(0.1).print(); // or tf.leakyRelu(x, 0.1)

    Type Parameters

    Parameters

    • x: TensorLike | T

      The input tensor.

    • Optional alpha: number

      The scaling factor for negative values, defaults to 0.2.

    Returns T

    Doc

Generated using TypeDoc