Neuromorphic computing is a hardware and software paradigm inspired by the structure of the human brain. This project benchmarks two neural network approaches on the MNIST handwritten-digit dataset:
- SNN (Spiking Neural Network) — a biologically inspired model that communicates via discrete spikes, implemented with
torch,torchvision, andspikingjelly. - CNN (Convolutional Neural Network) — a standard deep-learning model, implemented with
keras(TensorFlow backend),numpy, andscikit-learn. The goal is to compare the accuracy and run-time efficiency of SNNs vs CNNs for empirical research purposes.
- Python 3.8 or higher
- Clone the repository:
git clone https://github.com/RadoKyselak/Neuromorphic_Comp.git cd Neuromorphic_Comp - Create a virtual environment and activate it:
python -m venv venv venv\Scripts\activate # On Mac use `source venv/bin/activate`
- Install the required packages:
pip install -r requirements.txt
To run the SNN benchmark:
python "SNN benchmark.py"To run the CNN benchmark:
python "CNN benchmark.py"Both scripts automatically download the MNIST dataset on first run. The SNN script prints the start/end time and training loss, then reports test accuracy. The CNN script trains for 4 epochs and reports final accuracy.
This project is licensed under the Apache License. See the LICENSE file for details.
If you have any questions or feedback, please open an issue.