Labs · NIR
Inspecting a NIR graph.
The Neuromorphic Intermediate Representation (NIR) is a framework-neutral graph format for spiking neural networks. This lab reads one small example graph with nir-rs, a pure-Rust NIR implementation, compiled to WebAssembly without its native HDF5 reader.
IMPORTED · NIR structure
LIF layer with a leaky-integrator readout
This is imported graph structure, not a simulation. Nothing on this page runs neurons or produces spikes. The live Rust/WASM simulation on the homepage is a different network, built by synaptic-wiring and advanced by neuromod.
- Example
- Hand-authored example: three inputs, an affine projection into four LIF neurons, and a linear readout into two leaky integrators. Parameters are illustrative constants; nothing is trained or measured.
- Origin
- Hand-authored with the nir-rs graph API. Not trained, tuned, or measured.
- Parsed by
- nir-rs 0.4.5 with only its
serdefeature. The nativehdf5feature is not in the browser build. - Asset
- lif-readout-example.v1.json · revision 1
- Regenerate
cargo +1.98.1 test --manifest-path crates/neuromorphic-adapter/Cargo.toml --locked --features nir --test nir_example regenerate_nir_example -- --ignored --exact
Static render of the build-time nir-rs projection. Interactive inspection loads when JavaScript and WebAssembly are available.
Edges
inputtofc1fc1tolif1lif1tofc2fc2toli1li1tooutput
Operators
Every operator, as nir-rs reads it.
Rendered at build time from the committed nir-rs projection. Field names are NIR wire names, and every value is formatted in Rust and shown as is.
-
input
Input- Receives from
- none
- Sends to
- fc1
Parameters Field dtype Shape Values shapeusize 1 3 -
fc1
Affine- Receives from
- input
- Sends to
- lif1
Parameters Field dtype Shape Values weightf32 4 × 3 0.5, -0.25, 0, 0, 0.5, -0.25, -0.25, 0, 0.5, 0.25, 0.25, 0.25 biasf32 4 0, 0, 0, 0.125 -
lif1
LIF- Receives from
- fc1
- Sends to
- fc2
Parameters Field dtype Shape Values tauf64 4 0.02, 0.02, 0.02, 0.02 rf64 4 1, 1, 1, 1 v_leakf64 4 0, 0, 0, 0 v_thresholdf64 4 1, 1, 1, 1 v_resetf64 4 0, 0, 0, 0 -
fc2
Linear- Receives from
- lif1
- Sends to
- li1
Parameters Field dtype Shape Values weightf32 2 × 4 1, 0, 1, 0, 0, 1, 0, 1 -
li1
LI- Receives from
- fc2
- Sends to
- output
Parameters Field dtype Shape Values tauf64 2 0.05, 0.05 rf64 2 1, 1 v_leakf64 2 0, 0 -
output
Output- Receives from
- li1
- Sends to
- none
Parameters Field dtype Shape Values shapeusize 1 2