From c0f36f5517a0a58aa47c77e57bac5250b70c1c01 Mon Sep 17 00:00:00 2001 From: CHatingPython Date: Fri, 18 Sep 2026 18:20:30 +0200 Subject: [PATCH] refactor: isolate layer inputs from layers --- include/nn.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/nn.hpp b/include/nn.hpp index 6967482..32ad47f 100644 --- a/include/nn.hpp +++ b/include/nn.hpp @@ -15,7 +15,9 @@ enum class layer_type { Dense, }; -class layer_input {}; +struct layer_input { + static constexpr std::uint32_t DENSE_TAG = 0x444E5345; +}; template class dense_input : public layer_input { @@ -25,7 +27,7 @@ class dense_input : public layer_input { friend class layer_info; private: struct inner final { - static constexpr layer_type TYPE = layer_type::Dense; + static constexpr std::uint32_t TAG = DENSE_TAG; static constexpr std::size_t FEATURES = Features; @@ -71,7 +73,7 @@ private: static constexpr layer_type TYPE = layer_type::Dense; using input_type = input_type_s::type; - static_assert(input_type::TYPE == layer_type::Dense); + static_assert(input_type::TAG == layer_input::DENSE_TAG); using output_type = input_inner_t>;