Skip to main content

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


Download files

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

Source Distribution

neuromap-0.1.4.tar.gz (36.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuromap-0.1.4-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

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

Hashes for neuromap-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1e032b14ee8c245cedc3969db4870e4caf7928a4e31f8bbe687cfe13baf3e81c
MD5 d776c4c41bf2051b1cce10001137c997
BLAKE2b-256 2a5ab4dc755b7d427d4d383dd92192b3ccc29f661b41a28a2a64284959368200

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuromap-0.1.4.tar.gz:

Publisher: publish.yml on laurent-colas/neuromap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for neuromap-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0061d4f730e8c35c9c1fad471d42d37f5077f2d2009782d9758ec2fdc0af9026
MD5 7e082926b2a546153cf1ad79daf10a30
BLAKE2b-256 da274b61f925531ba78afa83a6cb94884ffe4266b071fd1a1b75cf623fb79886

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuromap-0.1.4-py3-none-any.whl:

Publisher: publish.yml on laurent-colas/neuromap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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