Synapses¶
Implement static and plastic binary synapses
A synapse object should implement three methods:
A __call__ method taking an arbitrary number of inputs and returning the synapse output
An update(xo) method that passes the output of the neurons
A reset() method
Update and reset can be dummies, but a SpikingNet object expects that they will be implemented.
- class spikelearn.synapses.BaseSynapse(Ne, No, W0, transform=None, learning_rule=None, syn_type=None)¶
Base class for a synapse.
- Parameters:
Ne – dimensions of presynaptic neurons
No – dimensions of postsynaptic neurons
transform – input transform
syn_type – type of synapse, one of exc, inh, hybrid, None
- property W¶
Returns the synaptic weights
- class spikelearn.synapses.OneToOneSynapse(Ne, W0, transform=None, learning_rule=None, syn_type=None)¶
One to one static synapse
Implement one to one static synapse chaining each input to its corresponding output.
- Parameters:
Ne – Dimensions of neurons in the layer
W0 – Synaptic weights
transform – input transform
syn_type – type of synapse, one of exc, inh, hybrid, None
- class spikelearn.synapses.STDPSynapse(Ne, No, W0, tre, tro, transform=None, rule_params=None, Wlim=1, syn_type=None, tracelim=10)¶
- class spikelearn.synapses.StaticSynapse(Ne, No, W0, transform=None, syn_type=None)¶
Base class for a synapse where synaptic weights are stored in a 2D array.
- Parameters:
Ne – number of presynaptic neurons
No – number of postsynaptic neurons
W0 – a 2D array with the initial synaptic weights
transform – input transform
syn_type – type of synapse, one of exc, inh, hybrid, None