Note
This documentation is for a development version. Click here for the latest stable release (v0.5.0).
Loihi training¶
When training models for Loihi using NengoDL,
you can improve performance by better matching
the chip’s neuron cores using the LoihiLIF
and LoihiSpikingRectifiedLinear
neuron types.
This module, which is automatically used by NengoLoihi,
adds builders to NengoDL that allow those neuron types
to build and train properly.
Neuron output noise models¶
-
class
nengo_extras.loihi_training.
NeuronOutputNoise
[source]¶ Noise added to the output of a rate neuron.
Often used when training deep networks with rate neurons for final implementation in spiking neurons to simulate the variability caused by spiking.
-
class
nengo_extras.loihi_training.
LowpassRCNoise
(tau_s)[source]¶ Noise model combining Lowpass synapse and neuron membrane filters.
Samples “noise” (i.e. variability) from a regular spike train filtered by the following transfer function, where \(\tau_{rc}\) is the membrane time constant and \(\tau_s\) is the synapse time constant:
\[H(s) = [(\tau_s s + 1) (\tau_{rc} s + 1)]^{-1}\]See [1] for background and derivations.
References
- 1
E. Hunsberger (2018) “Spiking Deep Neural Networks: Engineered and Biological Approaches to Object Recognition.” PhD thesis. pp. 106–113. (http://compneuro.uwaterloo.ca/publications/hunsberger2018.html)
- Attributes
- tau_sfloat
Time constant for Lowpass synaptic filter.
-
class
nengo_extras.loihi_training.
AlphaRCNoise
(tau_s)[source]¶ Noise model combining Alpha synapse and neuron membrane filters.
Samples “noise” (i.e. variability) from a regular spike train filtered by the following transfer function, where \(\tau_{rc}\) is the membrane time constant and \(\tau_s\) is the synapse time constant:
\[H(s) = [(\tau_s s + 1)^2 (\tau_{rc} s + 1)]^{-1}\]See [1] for background and derivations.
References
- 1
E. Hunsberger (2018) “Spiking Deep Neural Networks: Engineered and Biological Approaches to Object Recognition.” PhD thesis. pp. 106–113. (http://compneuro.uwaterloo.ca/publications/hunsberger2018.html)
- Attributes
- tau_sfloat
Time constant for Alpha synaptic filter.
NengoDL builders¶
-
class
nengo_extras.loihi_training.
NoiseBuilder
(ops, noise_models)[source]¶ Build noise classes in
nengo_dl
.- Attributes
- noise_modelslist of NeuronOutputNoise
The noise models used for each op/signal.
-
class
nengo_extras.loihi_training.
NoNoiseBuilder
(ops, noise_models)[source]¶ nengo_dl builder for if there is no noise model.
-
class
nengo_extras.loihi_training.
LowpassRCNoiseBuilder
(ops, noise_models)[source]¶ nengo_dl builder for the LowpassRCNoise model.
-
class
nengo_extras.loihi_training.
AlphaRCNoiseBuilder
(ops, noise_models)[source]¶ nengo_dl builder for the AlphaRCNoise model.