class brainpy.dyn.Leaky(size, sharding=None, keep_size=False, mode=None, name=None, tau=10.0, method='exp_auto', init_var=True)[source]#

Leaky Integrator Model.

Model Descriptions

This class implements a leaky model, in which its dynamics is given by:

\[x(t + \Delta t) = \exp{-\Delta t/\tau} x(t) + I\]
  • tau (Union[float, TypeVar(ArrayType, Array, Variable, TrainVar, Array, ndarray), Callable]) – float, ArrayType, Initializer, callable. Membrane time constant.

  • method (str) – str. The numerical integration method. Default “exp_auto”.

  • init_var (bool) – Initialize the variable or not.

  • size (Union[int, Sequence[int]]) – int, or sequence of int. The neuronal population size.

  • sharding (Optional[Sequence[str]]) – The sharding strategy.

  • keep_size (bool) – bool. Keep the neuron group size.

  • mode (Optional[Mode]) – Mode. The computing mode.

  • name (Optional[str]) – str. The group name.

supported_modes: Optional[Sequence[bm.Mode]] = (<class 'brainpy._src.math.modes.TrainingMode'>, <class 'brainpy._src.math.modes.NonBatchingMode'>)#

Supported computing modes.


The function to specify the updating rule.