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