leakyDeriv function

Matrix leakyDeriv(
  1. Matrix matrix
)

derivative of a leaky relu matrix

  • matrix The matrix to find the derivative
  • Returns The new matrix

Implementation

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