SDK for programming Neuromap neuromorphic chips
Project description
Neuromap SDK
Python SDK for programming Neuromap neuromorphic chips.
Installation
pip install neuromap
For development (using Poetry):
cd neuro-sim
poetry install --with dev
Quick Start
from neuromap import Network, Trainer, Exporter, chips
# Build a network matching the NeuroSoC-v1 chip
net = Network(chips.NEUROSOC_V1)
print(net.summary())
# Train
trainer = Trainer(net, lr=1e-3, epochs=20)
history = trainer.fit(train_loader, val_loader)
# Export for deployment
Exporter(net).quantize().save("model.nmap")
Simplified API (snnTorch)
The SDK provides convenience functions backed by snnTorch for a streamlined workflow:
import neuromap as nm
# Encode raw data to spike trains (wraps snntorch.spikegen)
spike_data = nm.encode_sensor_data(raw_images, num_steps=100)
# Build network from the fixed chip topology
model = nm.Network(nm.chips.NEUROSOC_V1)
# Configure surrogate gradients for training
nm.compile_model(model, surrogate="atan")
# Train, then quantize & export to hardware
nm.quantize_and_export_to_spi(model, path="model.nmap")
Available surrogate gradients: "atan" (default), "fast_sigmoid", "straight_through", "spike_rate_escape".
Available encoding methods: "rate" (default), "latency", "delta".
Running Tests
poetry run pytest tests/ -v
Or via Nx from the repo root:
npx nx run neuro-sim:test
Linting & Formatting
poetry run ruff check .
poetry run ruff format .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neuromap-0.1.4.tar.gz.
File metadata
- Download URL: neuromap-0.1.4.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e032b14ee8c245cedc3969db4870e4caf7928a4e31f8bbe687cfe13baf3e81c
|
|
| MD5 |
d776c4c41bf2051b1cce10001137c997
|
|
| BLAKE2b-256 |
2a5ab4dc755b7d427d4d383dd92192b3ccc29f661b41a28a2a64284959368200
|
Provenance
The following attestation bundles were made for neuromap-0.1.4.tar.gz:
Publisher:
publish.yml on laurent-colas/neuromap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neuromap-0.1.4.tar.gz -
Subject digest:
1e032b14ee8c245cedc3969db4870e4caf7928a4e31f8bbe687cfe13baf3e81c - Sigstore transparency entry: 1175421987
- Sigstore integration time:
-
Permalink:
laurent-colas/neuromap@f743c46cfa8c6648c9883048d0eb0b741e70cddb -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/laurent-colas
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f743c46cfa8c6648c9883048d0eb0b741e70cddb -
Trigger Event:
push
-
Statement type:
File details
Details for the file neuromap-0.1.4-py3-none-any.whl.
File metadata
- Download URL: neuromap-0.1.4-py3-none-any.whl
- Upload date:
- Size: 45.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0061d4f730e8c35c9c1fad471d42d37f5077f2d2009782d9758ec2fdc0af9026
|
|
| MD5 |
7e082926b2a546153cf1ad79daf10a30
|
|
| BLAKE2b-256 |
da274b61f925531ba78afa83a6cb94884ffe4266b071fd1a1b75cf623fb79886
|
Provenance
The following attestation bundles were made for neuromap-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on laurent-colas/neuromap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neuromap-0.1.4-py3-none-any.whl -
Subject digest:
0061d4f730e8c35c9c1fad471d42d37f5077f2d2009782d9758ec2fdc0af9026 - Sigstore transparency entry: 1175422000
- Sigstore integration time:
-
Permalink:
laurent-colas/neuromap@f743c46cfa8c6648c9883048d0eb0b741e70cddb -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/laurent-colas
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f743c46cfa8c6648c9883048d0eb0b741e70cddb -
Trigger Event:
push
-
Statement type: