codeplea/genann
Freesimple neural network library in ANSI C
About codeplea/genann
Genann is a minimal, well-tested library for training and using feedforward artificial neural networks (ANN) in C. It focuses on simplicity, speed, reliability, and hackability, providing only essential functions with little extra. The library is self-contained in a single C source file and header (genann.c and genann.h), has no dependencies beyond C99, and is released under the permissive zlib license. It implements standard backpropagation training but is compatible with alternative training methods (e.g., random search, genetic algorithms). The package includes four example programs demonstrating XOR training, random search, loading/saving networks, and the IRIS dataset, as well as a test suite. Genann is thread-safe and easily extendible, making it suitable for embedded systems or educational use.
Key Features
Pros & Cons
- Minimal and well-tested library with no external dependencies
- Single-file integration (just add genann.c and genann.h)
- Thread-safe and fast execution
- Permissive zlib license allows free use in nearly any project
- Includes practical examples and a test suite
- Easily hackable and extendible for custom training algorithms
- Limited to feedforward neural networks (no recurrent or convolutional support)
- Only standard backpropagation built-in; advanced features like momentum or regularization not included
- No GPU acceleration or support for deep learning with many layers
- Minimal documentation beyond the README and code comments