Files
Flux/include/random/engine.h
T
Bausager eb0a49591e 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.
2026-05-21 15:38:49 +02:00

20 lines
357 B
C++

#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);
}
}