Regulaization
Sync public mirror / sync (push) Failing after 27s

Started on regulaization in  Loss.h. I need to refactor the matsum.h since I need a total sum over the matrix. Also matmul needs a elementwise matmul function, which is the next this in the ragulaization
This commit is contained in:
2026-01-03 22:10:50 +01:00
parent 32ba0518fa
commit 48f329feef
17 changed files with 881 additions and 510 deletions
+14
View File
@@ -7,6 +7,20 @@
namespace numerics{
template <typename T>
T matsum_coeff(const utils::Matrix<T>& A) {
T b;
for (uint64_t i = 0; i < A.cols(); ++i){
for (uint64_t j = 0; j < A.rows(); ++j){
b += A(i, j);
}
}
return b;
}
template <typename T>
utils::Vector<T> matsum(const utils::Matrix<T>& A, std::string method) {