|
FlexNN 1
Fully connected neural network built from scratch with flexible n-layer design and multiple activations.
|
Header for FlexNN neural network (heterogeneous stack via Layers::Layer). More...
#include <vector>#include <Eigen/Dense>#include "activations/Activation.hpp"#include "layers/Layer.hpp"#include "Layer.h"

Go to the source code of this file.
Classes | |
| class | FlexNN::NeuralNetwork |
| Linear stack of heterogeneous layers (vector<Layers::Layer>). More... | |
Namespaces | |
| namespace | FlexNN |
| Namespace for the FlexNN neural network library. | |
Header for FlexNN neural network (heterogeneous stack via Layers::Layer).
After PR-04, NeuralNetwork holds std::vector<FlexNN::Layers::Layer> — a type-erased variant over Dense (and later Conv1D, BatchNorm1D, MaxPool1D, AvgPool1D). The legacy FlexNN::Layer (stringly-typed Dense) is kept for one release as a deprecated shim so src/main.cpp still builds; it is converted to Layers::Dense via Activations::try_parse.
Why variant, not inheritance (see LLD_FLEXNN §3): host training stays simple (Eigen, no vtable), variant is inline, and std::visit dispatches without indirection. For MCU we don't reuse these structs at all — export is flat arrays.