nuNN is a free, open-source machine learning library written in modern C++20 and released under the MIT License.
It provides compact and readable implementations of fundamental machine learning algorithms, with a focus on experimentation, education, and learning. The project is designed to make neural networks, reinforcement learning, and related algorithms understandable from source code, while still providing practical demos, tests, model serialization, and optional hardware acceleration.
The library includes:
Feedforward Neural Networks
Perceptron: single-neuron classifier with MSE or cross-entropy loss and momentum
MlpNN: classic fully connected multilayer perceptron with online SGD
MlpMatrixNN: Eigen-backed matrix MLP with mini-batch SGD, JSON serialization, and optional ArrayFire/OpenCL acceleration
RBF Network: radial basis function network with Gaussian centers and trainable output weights
Recurrent Neural Networks
VanillaRnn: Elman-style recurrent neural network with truncated BPTT
GRU: Gated Recurrent Unit with truncated BPTT
LSTM: Long Short-Term Memory network with truncated BPTT