The Neural Network Engine (NNE) is a C++ program I created as an exercise in understanding low-level machine learning fundamentals. It contains a self-written matrix library and several layer classes that can be connected to form a network.
The NNE is currently geared toward the MNIST handwritten digit classification problem but was designed to be scalable to more complicated tasks.
NNE and the MNIST Dataset
The NNE classifies MNIST using alternating convolutional and pooling layers to extract features from 28x28 grayscale digit images, followed by MLP layers for classification.
Code Organization and Polymorphism
The C++ code is organized so networks can be created and executed in a modular and intuitive way. Layer classes are grouped by type, including pooling, element-wise, MLP, and convolutional, all inheriting from a virtual layer base class with a common interface.
User Interface
The user interacts with NNE through MATLAB, where high-level C++ functions are exposed through wrapper functions. Wrapper calls in MATLAB send instructions to NNE via TCP, providing a familiar analysis environment and additional flexibility.