relu function

Matrix relu(
  1. Matrix matrix
)

relu of a matrix

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

Implementation

Matrix relu(Matrix matrix) {
  return matrix.performFunction((x) => max(0.0, x));
}