1 #ifndef OPENANN_ERROR_FUNCTIONS_H_
2 #define OPENANN_ERROR_FUNCTIONS_H_
17 template<
typename Derived1,
typename Derived2>
19 const Eigen::MatrixBase<Derived2>&
T)
21 return -(T.array() * ((Y.array() + 1e-10).log())).sum() / (double) Y.rows();
30 template<
typename Derived>
33 return YmT.array().square().sum() / (2.0 * (double) YmT.rows());
38 #endif // OPENANN_ERROR_FUNCTIONS_H_