There is a third way to get a trained spiking network, and it skips spike-domain training entirely: take a network trained the ordinary way and convert it. The bridge is a single fact — a ReLU's output is exactly what an integrate-and-fire neuron's firing rate approximates over $T$ timesteps. Line the two up and a conventional net becomes a spiking one, with an accuracy that you can trade against latency by choosing $T$.
An integrate-and-fire neuron accumulates its input and emits a spike each time it crosses threshold $\theta$. Drive it with a constant input $a$ and, over $T$ timesteps, it fires about $a/\theta$ of the time — its firing rate is proportional to the input, clipped at saturation. That is a rectifier: zero below, linear above, capped at the top. So a ReLU and a rate-coded IF neuron compute the same function, and the only error is that the spike count is an integer — the rate lives on a grid of $T{+}1$ levels rather than a continuum.
The grey line is the ReLU the ANN was trained with; the blue staircase is what an IF neuron can actually deliver in $T$ timesteps. With few timesteps the steps are coarse and the fit is loose; add timesteps and the staircase closes on the line, its worst-case error shrinking as $\theta/2T$. That is the whole latency–accuracy trade of converted spiking networks, in one picture. The $+\tfrac12$ inside the floor is a round-to-nearest shift that halves the error — the same shift the converter pre-loads into the IF membrane.
The toolkit converts a trained PyTorch model automatically, picking the route from the activations it finds. Both end at the same place — an IF-neuron network whose spike counts over $T$ steps reproduce the ANN's output — but they differ in how the thresholds are set and how much error is left.
Threshold balancing Diehl et al. 2015. For an ordinary ReLU model, replace each ReLU with an IF neuron and rescale the weights so that the layer's calibrated maximum activation — measured at a high percentile of real data — lands exactly on the firing threshold. Nothing over-saturates, nothing wastes range, and a spike train of rate $a/\theta$ then approximates each activation $a$. No retraining is needed, only a calibration pass.
QCFS Bu et al. 2022, ICLR. Train the ANN with the QCFS activation above in place of ReLU, and its learned per-layer thresholds become the IF thresholds directly — no calibration pass. Each IF neuron is then initialised to a membrane potential of $\theta/2$, the shift that cancels the flooring bias exactly, and the converted SNN loses almost no accuracy at the matching timestep budget. It is the low-latency route: the network was, in effect, trained already knowing it would become spikes.
Conversion is the third route to a trained spiking network, beside surrogate-gradient training and local plasticity. It is the pragmatic one: it reuses the enormous investment in ordinary deep learning — the architectures, the pretrained weights, the tooling — and pays only a calibration pass and a chosen latency to land on neuromorphic hardware. Once converted, the network is an ordinary spiking model on this site: the same IF neurons, the same event-driven datapath, the same synthesis path to an FPGA.
Evidence boundary: the demo plots the library's exact QCFS activation $\operatorname{clip}(\lfloor xT/\theta+\tfrac12\rfloor,0,T)\theta/T$ in your browser at $\theta=1$. Real conversion runs over full PyTorch models — weight extraction, per-layer thresholding, normalisation — and requires PyTorch, not this page. Accuracy after conversion depends on the model, the data, and $T$; no accuracy figures are quoted here.