|
FlexNN 1
Fully connected neural network built from scratch with flexible n-layer design and multiple activations.
|
BatchNorm1D layer for FlexNN::Layers (training stats, aux export). More...
#include <utility>#include <Eigen/Dense>#include "LayerTypes.hpp"#include "../activations/Activation.hpp"

Go to the source code of this file.
Classes | |
| class | FlexNN::Layers::BatchNorm1D |
Namespaces | |
| namespace | FlexNN |
| Namespace for the FlexNN neural network library. | |
| namespace | FlexNN::Layers |
BatchNorm1D layer for FlexNN::Layers (training stats, aux export).
Implements per-feature y = gamma*(x - mean)/sqrt(var+eps) + beta where training uses batch stats and predict uses running stats (momentum 0.1). The layer is Activation::None only in v0.1 (export error otherwise). aux blob in model.bin is [gamma, beta, mean, var] each [F] float32.
Why this file: BatchNorm is needed for stable Conv1D training and is folded by the runtime compiler (W_fold = W*gamma/sqrt(var+eps)), but FlexNN still exports it as a separate layer for training correctness.