Neural Network

Started on implementing neural network from NNFS. I've done ReLU and stopped at p.104. Softmax is not ready.
This commit is contained in:
2025-10-03 20:54:37 +02:00
parent a86410fda7
commit 88227a38fc
19 changed files with 626 additions and 15 deletions
+3 -2
View File
@@ -11,11 +11,11 @@ namespace numerics{
// ---------------- Serial baseline ----------------
template <typename T>
utils::Matrix<T> matmul(const utils::Matrix<T>& A, const utils::Matrix<T>& B){
if(A.cols() != B.rows()){
throw std::runtime_error("matmul: dimension mismatch");
}
const uint64_t m = A.rows();
const uint64_t n = A.cols(); // also B.rows()
const uint64_t p = B.cols();
@@ -98,6 +98,7 @@ utils::Matrix<T> matmul_auto(const utils::Matrix<T>& A,
// Tiny problems: serial is cheapest.
if (!can_parallel || work < threads*4ull) {
return matmul(A,B);
}
// Plenty of (i,j) work → collapse(2) is a great default.