Skip to main content

A powerful Python package for simulating spiking neural networks (SNNs) using PyTorch with GPU acceleration.

Project description

SynapticFlow

Light Logo

Spiking Neural Networks (SNNs) are a type of artificial neural network that attempts to mimic the behavior of neurons in the brain. Unlike traditional neural networks that use continuous-valued signals, SNNs operate using discrete spikes of activity that are similar to the action potentials in biological neurons. SynapticFlow is a powerful Python package for prototyping and simulating SNNs. It is based on PyTorch and supports both CPU and GPU computation. SynapticFlow extends the capabilities of PyTorch and enables us to take advantage of using spiking neurons. Additionally, it offers different variations of synaptic plasticity as well as delay learning for SNNs.

Please consider supporting the SynapticFlow project by giving it a star ⭐️ on Github, as it is a simple and effective way to show your appreciation and help the project gain more visibility.

If you encounter any problems, want to share your thoughts or have any questions related to training spiking neural networks, we welcome you to open an issue, start a discussion, or join our Discord channel where we can chat and offer advice.

Installation

To install synapticflow, run the following command in your terminal:

$ pip install synapticflow

We recommend using this method to install synapticflow since it will ensure that you have the latest stable version installed.

If you prefer to install synapticflow from source instead, follow these instructions:

$ git clone https://github.com/arsham-khoee/synapticflow
$ cd synapticflow
$ python setup.py install

Requirements

The requirements for SynapticFlow are as follows:
  • torch
  • matplotlib

Usage

After package installation has been finished, you can use it by following command:

import synapticflow as sf

In following code, a simple LIF neuron has been instantiated:

model = sf.LIFPopulation(n=1)
print(model.v) # Membrane Potential
print(model.s) # Spike Trace

SynapticFlow Structure

The following are the components included in SynapticFlow:

Component Description
synapticflow.network A spiking network components like neurons and connections
synapticflow.encoding Several encoders implementation
synapticflow.learning Learning rules and surrogate gradients
synapticflow.evaluation Several evaluation functions for networks
synapticflow.datasets Include MNIST, Fashion-MNIST, CIFAR-10 benchmark datasets
synapticflow.vision Include vision components for neuroscience
synapticflow.plot Plot tools for neural networks visualization

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synapticflow-0.0.7.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

synapticflow-0.0.7-py2.py3-none-any.whl (43.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file synapticflow-0.0.7.tar.gz.

File metadata

  • Download URL: synapticflow-0.0.7.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for synapticflow-0.0.7.tar.gz
Algorithm Hash digest
SHA256 34d5a2f704a5aefbfdd1293758fadb0b6673a97e1c5e730e7c7294a49e26209f
MD5 b9427eb032cf38facd666c75a67830d8
BLAKE2b-256 c7fdae101802cee8f4f7ae5161f2c661b4ac77c076e8faa51b2e6903c5aa1ba9

See more details on using hashes here.

File details

Details for the file synapticflow-0.0.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for synapticflow-0.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9f5a640e9c14b3cff8bdf91eb760483c67b778806d4d3e10505ddf5bebcc1bdd
MD5 2780458b3f4f184d6f726a6e48bded9d
BLAKE2b-256 96aada4bbd5ff3f7b383d4678c5c67124ce77e9ba88f02b37ac4869c8a3db2e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page