# brainpy.dyn.base.CondNeuGroup#

class brainpy.dyn.base.CondNeuGroup(size, keep_size=False, C=1.0, A=0.001, V_th=0.0, V_initializer=Uniform(min_val=- 70, max_val=- 60.0, seed=4298694), noise=None, method='exp_auto', name=None, mode=NormalMode, **channels)[source]#

Base class to model conductance-based neuron group.

The standard formulation for a conductance-based model is given as

$C_m {dV \over dt} = \sum_jg_j(E - V) + I_{ext}$

where $$g_j=\bar{g}_{j} M^x N^y$$ is the channel conductance, $$E$$ is the reversal potential, $$M$$ is the activation variable, and $$N$$ is the inactivation variable.

$$M$$ and $$N$$ have the dynamics of

${dx \over dt} = \phi_x {x_\infty (V) - x \over \tau_x(V)}$

where $$x \in [M, N]$$, $$\phi_x$$ is a temperature-dependent factor, $$x_\infty$$ is the steady state, and $$\tau_x$$ is the time constant. Equivalently, the above equation can be written as:

$\frac{d x}{d t}=\phi_{x}\left(\alpha_{x}(1-x)-\beta_{x} x\right)$

where $$\alpha_{x}$$ and $$\beta_{x}$$ are rate constants.

New in version 2.1.9: Model the conductance-based neuron model.

Parameters
• size (int, sequence of int) – The network size of this neuron group.

• method (str) – The numerical integration method.

• name (optional, str) – The neuron group name.

__init__(size, keep_size=False, C=1.0, A=0.001, V_th=0.0, V_initializer=Uniform(min_val=- 70, max_val=- 60.0, seed=4298694), noise=None, method='exp_auto', name=None, mode=NormalMode, **channels)[source]#

Methods

 __init__(size[, keep_size, C, A, V_th, ...]) clear_input() Useful for monitoring inputs. derivative(V, t) get_batch_shape([batch_size]) get_delay_data(identifier, delay_step, *indices) Get delay data according to the provided delay steps. load_states(filename[, verbose]) Load the model states. nodes([method, level, include_self]) Collect all children nodes. offline_fit(target, fit_record) offline_init() online_fit(target, fit_record) online_init() register_delay(identifier, delay_step, ...) Register delay variable. register_implicit_nodes(*channels, ...) register_implicit_vars(*variables, ...) reset([batch_size]) Reset function which reset the whole variables in the model. reset_local_delays([nodes]) Reset local delay variables. reset_state([batch_size]) Reset function which reset the states in the model. save_states(filename[, variables]) Save the model states. train_vars([method, level, include_self]) The shortcut for retrieving all trainable variables. unique_name([name, type_]) Get the unique name for this object. update(tdi, *args, **kwargs) The function to specify the updating rule. update_local_delays([nodes]) Update local delay variables. vars([method, level, include_self]) Collect all variables in this node and the children nodes.

Attributes

 global_delay_data mode Mode of the model, which is useful to control the multiple behaviors of the model. name Name of the model. varshape The shape of variables in the neuron group.