Skip to main content

An open source Brian2 interface for the neuromorphic computing framework Lava

Project description

Brian2Lava

Brian is an open-source Python package developed and used by the computational neuroscience community to simulate spiking neural networks. The goal of the Brian2Lava open-source project is to develop a Brian device interface for the neuromorphic computing framework Lava, in order to facilitate deployment of brain-inspired algorithms on Lava-supported hardware and emulator backends.

For more information, please see our website and the documentation.

For a rundown of the new features and bugfixes addressed in the latest version, see the Release Notes.

Getting started

Below you'll find information on how to quickly get Brian2Lava to run. For further information, please visit the documentation.

Note: Brian2Lava is still in its testing phase. Please feel free to report issues or feature requests.

Note: At the moment, due to legal restrictions, models for the Loihi2 backend may just be provided to members of the Intel Neuromorphic Research Community. Thus, the public version of Brian2Lava currently contains models for the CPU backend only.

Installation

Brian2Lava can be easily installed via the Python Package Index (pip):

python3 -m pip install brian2lava

Note: conda support might be added at a later point.

For the latest source code, please visit gitlab.com/brian2lava/brian2lava. If you run from source code, make sure that you have added your path to the source code to PYTHONPATH, for example, via::

export PYTHONPATH=~/brian2lava

Import package and set device

Using Brian2Lava within Brian 2 only requires two steps.

First, import the package:

import brian2lava

Second, set the lava device with the desired hardware backend and mode:

set_device('lava', hardware='CPU', mode = 'flexible')

In principle, this can already run your Brian simulation on the Lava engine. However, you may have to use a few additional settings to specify how the code for the simulation is generated and executed. Please see the documentation for more information.

You may want to continue by considering the example code provided here.

Dependencies

Brian2Lava currently includes the library of preset models as an external dependency. To make sure that you have the latest version of the library in your installation, navigate to the Brian2Lava package folder and run

source update_submodules.sh

or manually execute

git init
git submodule foreach 'git pull origin main'

This will pull the latest version of the public library of preset models from a GitHub repository into your local Brian2Lava installation.

Further dependencies can be found in setup.py.

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

brian2lava-1.0.0b1.tar.gz (88.3 kB view hashes)

Uploaded Source

Built Distribution

brian2lava-1.0.0b1-py3-none-any.whl (209.9 kB view hashes)

Uploaded Python 3

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