MembraneSubtract#

class sinabs.activation.MembraneSubtract(subtract_value: Optional[float] = None)[source]#

Subtract the spiking threshold from the membrane potential for every neuron that spiked.

Parameters

subtract_value – optional value that will be subtraced from v_mem if it spiked. Defaults to spiking threshold if None.

Example

>>> activation_fn = sinabs.activation.ActivationFunction(
>>>                     reset_fn=MembraneSubtract(subtract_value=None)
>>>                     )
>>> layer = sinabs.layers.LIF(activation_fn=activation_fn, ...)
__call__(spikes, state, threshold)[source]#

Call self as a function.

__eq__(other)#

Return self==value.

__hash__ = None#
__init__(subtract_value: Optional[float] = None) None#
__repr__()#

Return repr(self).

__weakref__#

list of weak references to the object (if defined)