tanHDeriv function

Matrix tanHDeriv(
  1. Matrix matrix
)

derivative of a tanh matrix

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

Implementation

Matrix tanHDeriv(Matrix matrix) {
  return matrix.performFunction((x) => 1 - pow(x, 2));
}