reluDeriv function

Matrix reluDeriv(
  1. Matrix matrix
)

derivative of a relu matrix

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

Implementation

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