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
+17
View File
@@ -400,12 +400,29 @@ public:
}
return result;
}
//############################################
//# VECTOR: Abs #
//############################################
Vector<T> abs()const{
Vector<T> result = *this;
const uint64_t n = v.size();
for (uint64_t i = 0; i < n; ++i){
if (v[i]<T{0}){
result[i] = -v[i];
}
}
return result;
}
//############################################
//# VECTOR: Norm #
//############################################
T norm() const{
return static_cast<T>(std::sqrt(this->dot(*this)));
}
//############################################
//# VECTOR: Normalize #
//############################################