Layer Map
This page is a compact map of the library. Use it when you know roughly what you want but not which module or layer name to reach for.
SNN layers
tt.snn is the main part of traceTorch. It contains 32 leaky-integrator-based layers.
The output families are:
LIContinuous leaky integrator output. No threshold, no firing, no reset. Variants:
LI,DLI,SLI,DSLI,LIEMA,DLIEMA,SLIEMA,DSLIEMA.LIBOne-sided binary-style firing. Uses one positive threshold. Variants:
LIB,DLIB,SLIB,RLIB,DSLIB,DRLIB,SRLIB,DSRLIB.LITTernary-style firing with positive and negative thresholds. Variants:
LIT,DLIT,SLIT,RLIT,DSLIT,DRLIT,SRLIT,DSRLIT.LITSTernary-style firing with separate positive and negative output scales. Variants:
LITS,DLITS,SLITS,RLITS,DSLITS,DRLITS,SRLITS,DSRLITS.
The prefixes are mechanical:
DDual positive/negative traces.
SSynaptic input trace before the membrane.
RRecurrent trace of the previous output.
Start with LIB for ordinary SNN experiments, LI for continuous readout, LIT for signed events, and LITS
when signed events need separate magnitudes.
RNN layers
tt.rnn contains classic recurrent layers with traceTorch state management:
SimpleRNNA tanh Elman-style recurrent layer.
LSTMA long short-term memory layer with hidden and cell states.
GRUA gated recurrent unit with reset and update gates.
These layers process one timestep per forward call. They are useful when you want conventional RNN dynamics but still
want tt.Model.zero_states(), detach_states(), and state saving.
SSM layers
tt.ssm contains state-space-style layers adapted to the same one-timestep interface:
S4,S5,S6,MambaExperimental traceTorch-compatible implementations.
These layers are convenient for mixing SNNs, RNNs, and SSM-like dynamics in the same model. They are not intended to be drop-in replacements for optimized official SSM implementations.
Core layers
tt.Layer is the base class for traceTorch layers. It provides:
state registration and lazy state initialization;
recursive zero/detach behavior through
tt.Model;constrained parameter registration;
compile/decompile support;
helpers for moving the target dimension to and from the working dimension.
Most users do not need to subclass tt.Layer immediately. Read Creating a Custom Layer when you want to
create a new traceTorch-compatible layer.
Functional helpers
tt.functional contains small functions used by layers:
decay/halflife conversion helpers;
inverse transforms for constrained parameters;
sigmoid4xas the default SNN spike function;straight-through quantizers such as
round_ste()andstochastic_round_ste().
Plotting helpers
tt.plot contains plotting utilities used by experiments and examples. These are secondary to the core library and
may evolve more freely than the model/layer APIs.