Skip to main content

What we are building

A rate-coded classifier: 20 input features, 64 hidden LIF neurons, 5 output classes. We will generate synthetic data, train for 10 epochs, compile the model, and run it. This is intentionally minimal. The goal is to show the complete authoring loop — not to achieve a state-of-the-art result.

Setup

Define the model

Generate synthetic data

We will use a rate-encoded dataset: each class is a sparse spike pattern over T=50 timesteps.

Train

After 10 epochs, accuracy on this synthetic task should exceed 90%.

Compile

The compiler resolves tau_memalpha, validates the architecture, encodes weights as base64 little-endian f32, and writes a CRC32-sealed artifact.

Run

The simulator loads the artifact, runs it on a zero-input spike raster (the default), and prints the transcript. To run on a specific input, pipe a JSON spike raster:

Verify artifact integrity

Where to go next

Keyword spotting

Train on a real neuromorphic dataset: Spiking Heidelberg Digits.

API: thrindex.snn

Full parameter reference for LIF, Dense, Sequential, Conv2d.