Dropout Layer

Implemented rng::uniform and rng::binomial for single values, vectors and matrices. implemeted dropout layers and tested it. Also fixed the validation code. Before it used y one place, now it uses y_test as it should.
This commit is contained in:
2026-05-21 15:38:49 +02:00
parent be2c193341
commit eb0a49591e
14 changed files with 395 additions and 116 deletions
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include <random>
#include <cstdint>
namespace rng {
using seed_type = std::uint64_t;
using engine_type = std::mt19937_64;
inline engine_type& engine() {
static thread_local engine_type eng{std::random_device{}()};
return eng;
}
inline void seed(seed_type value) {
engine().seed(value);
}
}