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
+29
View File
@@ -17,6 +17,35 @@ namespace numerics{
}
}
template <typename T>
void inplace_max(utils::Matrix<T>& A, const T b){
const uint64_t rows = A.rows();
const uint64_t cols = A.cols();
for (uint64_t i = 0; i < rows; ++i){
for (uint64_t j = 0; j < cols; ++j){
if (b > A(i,j)){
//std::cout << A(i,j) << std::endl;
A(i,j) = b;
//std::cout << A(i,j) << std::endl;
}
}
}
}
template <typename T>
utils::Matrix<T> max(const utils::Matrix<T>& A, const T b){
utils::Matrix<T> B = A;
inplace_max(B, b);
return B;
}
} // namespace numerics