8 static Eigen::MatrixXd activate(
const Eigen::MatrixXd &z) {
9 Eigen::MatrixXd negZ = -z;
10 return 1 / (1 + negZ.array().exp());
13 static Eigen::MatrixXd diff(
const Eigen::MatrixXd &a) {
14 return a.array() * (1.0 - a.array());
17 static inline std::string slug =
"sig";