leakyRelu function

Matrix leakyRelu(
  1. Matrix matrix
)

leaky relu of a matrix

  • matrix The matrix to find the leaky relu
  • Returns The new matrix

Implementation

Matrix leakyRelu(Matrix matrix) {
  return matrix.performFunction((x) => x > 0 ? x : 0.01 * x);
}