Skip to content

A lightweight Spiking Neural Network implementation based on the Spike-Time Dependent Plasticity (STDP) algorithm.

Notifications You must be signed in to change notification settings

Albert-Osei/SNN-implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spiking-Neural-Network (SNN)

This project is an implementation of a basic SNN library that supports simple image classification example.

Built With

Getting Started

Prerequisites

  • Python version 3.11.3 >

    https://www.python.org/
  • Virtualenv

    https://pypi.org/project/virtualenv/

Installation

  1. Clone the repository

    git clone https://github.com/Albert-Osei/SNN-implementation.git
  2. Create Virtual Environment

    virtualenv .spike-venv

    OR

    python -m venv spike-venv
  3. Activate Virtual Environment

    source spike-venv\scripts\activate ~ on~windows
    source spike-venv/bin/. activate ~ on~mac
  4. Install Dependencies

    pip install -r requirements.txt

Running

  • cd into the root where the project is cloned
  • run classification/classify.py
  • this command will use pregenerated weights and output the results of classifying the test images

Weight Reconstruction (Training)

  • to reconstruct the weights, run binary_class/learning.py
  • this command will generate new weights file and output neuron[1-3].png which will show the reconstructed weights. One neuron should look random, the other two will produce a pattern similar to the O, and another a pattern similar to the X.

About

A lightweight Spiking Neural Network implementation based on the Spike-Time Dependent Plasticity (STDP) algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages