refactor: isolate layer inputs from layers

This commit is contained in:
2026-09-18 18:20:30 +02:00
parent d76e26e2f0
commit c0f36f5517
+5 -3
View File
@@ -15,7 +15,9 @@ enum class layer_type {
Dense,
};
class layer_input {};
struct layer_input {
static constexpr std::uint32_t DENSE_TAG = 0x444E5345;
};
template <std::size_t Features>
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<NN, I>::type;
static_assert(input_type::TYPE == layer_type::Dense);
static_assert(input_type::TAG == layer_input::DENSE_TAG);
using output_type = input_inner_t<dense_input<Features>>;