sigmoidDeriv function
derivative of a sigmoid matrix
matrixThe matrix to find the derivative- Returns The new matrix
Implementation
Matrix sigmoidDeriv(Matrix matrix) {
return matrix.performFunction(
(x) => ((1 / (1 + exp(-x))) * (1 - (1 / (1 + exp(-x))))),
);
}