Feed forward neural network written in C++ leverages OpenMP to parallelize calculations, designed to classify hand written digits from MNIST dataset. Assignment for Parallel Processing classes at Poznan University of Technology.
The classification performance is influenced by the choice of hyperparameters, weight initialization, and the input data size. Both the sequential and parallel versions yield similar results. The table presents accuracy values for a test set with 500 samples, a learning rate of 0.01, 500 neurons in the hidden layer, and weight initialization using values drawn from a uniform distribution of
| Train Size | Training | Inference |
|---|---|---|
| 200 | 0.62 | 0.629 |
| 500 | 0.724 | 0.762 |
| 1000 | 0.778 | 0.82 |
| 5000 | 0.877 | 0.914 |
As can be seen from the plots, the training times for the parallel processing solution are smaller compared to those observed during sequential learning - the best results are achieved when using 12 threads. The performance difference becomes more pronounced as the number of neurons in the hidden layer increases. This observation is expected since the network matrix dimensions have a direct relationship with the number of hidden neurons.