Integrator#
- class brainpy.dyn.Integrator(size, keep_size=False, sharding=None, name=None, mode=None, tau=10.0, x_initializer=ZeroInit, method='exp_auto', init_var=True)[source]#
Integrator Model.
This class implements an integrator model, in which its dynamics is given by:
\[\tau \frac{dx}{dt} = - x(t) + I(t)\]where \(x\) is the integrator value, and \(\tau\) is the time constant.
- Parameters:
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”.x_initializer (
Union
[Callable
,TypeVar
(ArrayType
,Array
,Variable
,TrainVar
,Array
,ndarray
)]) – ArrayType, Initializer, callable. The initializer of \(x\).size (
Union
[int
,Sequence
[int
]]) – int, or sequence of int. The neuronal population size.keep_size (
bool
) – bool. Keep the neuron group size.
- reset_state(batch_size=None, **kwargs)[source]#
Reset function which resets local states in this model.
Simply speaking, this function should implement the logic of resetting of local variables in this node.
See https://brainpy.readthedocs.io/en/latest/tutorial_toolbox/state_resetting.html for details.
- supported_modes: Optional[Sequence[bm.Mode]] = (<class 'brainpy._src.math.modes.TrainingMode'>, <class 'brainpy._src.math.modes.NonBatchingMode'>)#
Supported computing modes.