spynnaker.pyNN.models.neuron.implementations package¶
Module contents¶
- class spynnaker.pyNN.models.neuron.implementations.AbstractNeuronImpl¶
Bases:
objectAn abstraction of a whole neuron model including all parts.
- abstractmethod add_parameters(parameters: RangeDictionary) None[source]¶
Add the initial values of the parameters to the parameter holder.
- Parameters:
parameters (RangeDictionary) – A holder of the parameters
- abstractmethod add_state_variables(state_variables: RangeDictionary) None[source]¶
Add the initial values of the state variables to the state variables holder.
- Parameters:
state_variables (RangeDictionary) – A holder of the state variables
- abstract property binary_name: str¶
The name of the binary executable of this implementation.
- Return type:
- abstractmethod get_global_weight_scale() float[source]¶
Get the weight scaling required by this model.
- Return type:
- abstractmethod get_n_synapse_types() int[source]¶
Get the number of synapse types supported by the model.
- Return type:
- abstractmethod get_recordable_data_types() Mapping[str, DataType][source]¶
Get the data type of the variables that can be recorded.
- abstractmethod get_recordable_units(variable: str) str[source]¶
Get the units of the given variable that can be recorded.
- Parameters:
variable (str) – The name of the variable
- abstractmethod get_recordable_variable_index(variable: str) int[source]¶
Get the index of the variable in the list of variables that can be recorded.
- abstractmethod get_recordable_variables() Sequence[str][source]¶
Get the names of the variables that can be recorded in this model.
- abstractmethod get_synapse_id_by_target(target: str) int | None[source]¶
Get the ID of a synapse given the name.
- abstractmethod get_synapse_targets() Sequence[str][source]¶
Get the target names of the synapse type.
- class spynnaker.pyNN.models.neuron.implementations.AbstractStandardNeuronComponent(structs: List[Struct], units: Dict[str, str])¶
Bases:
objectRepresents a component of a standard neural model.
- Parameters:
- abstractmethod add_parameters(parameters: RangeDictionary[float]) None[source]¶
Add the initial values of the parameters to the parameter holder.
- Parameters:
parameters (RangeDictionary) – A holder of the parameters
- abstractmethod add_state_variables(state_variables: RangeDictionary[float]) None[source]¶
Add the initial values of the state variables to the state variables holder.
- Parameters:
state_variables (RangeDictionary) – A holder of the state variables
- get_units(variable: str) str[source]¶
Get the units of the given variable.
- Parameters:
variable (str) – The name of the variable
- has_variable(variable: str) bool[source]¶
Determine if this component has a variable by the given name.
- property structs: List[Struct]¶
The structures of the component. If there are multiple structures, the order is how they will appear in memory; where there are structures that repeat per neuron the repeats will appear adjacent e.g. for non-repeating structure g, followed by repeating structures s1 and s2 with 3 neurons the layout will be:
[g, s1, s1, s1, s2, s2, s2].
- class spynnaker.pyNN.models.neuron.implementations.NeuronImplStandard(model_name: str, binary: str, neuron_model: NeuronModel, input_type: AbstractInputType, synapse_type: AbstractSynapseType, threshold_type: AbstractThresholdType, additional_input_type: AbstractAdditionalInput | None = None)¶
Bases:
AbstractNeuronImplThe standard componentised neuron implementation.
- Parameters:
model_name (str)
binary (str)
neuron_model (AbstractNeuronModel)
input_type (AbstractInputType)
synapse_type (AbstractSynapseType)
threshold_type (AbstractThresholdType)
additional_input_type (AbstractAdditionalInput or None)
- add_parameters(parameters: RangeDictionary) None[source]¶
Add the initial values of the parameters to the parameter holder.
- Parameters:
parameters (RangeDictionary) – A holder of the parameters
- add_state_variables(state_variables: RangeDictionary) None[source]¶
Add the initial values of the state variables to the state variables holder.
- Parameters:
state_variables (RangeDictionary) – A holder of the state variables
- get_global_weight_scale() float[source]¶
Get the weight scaling required by this model.
- Return type:
- get_n_synapse_types() int[source]¶
Get the number of synapse types supported by the model.
- Return type:
- get_recordable_data_types() Mapping[str, DataType][source]¶
Get the data type of the variables that can be recorded.
- get_recordable_units(variable: str) str[source]¶
Get the units of the given variable that can be recorded.
- Parameters:
variable (str) – The name of the variable
- get_recordable_variable_index(variable: str) int[source]¶
Get the index of the variable in the list of variables that can be recorded.
- get_recordable_variables() Sequence[str][source]¶
Get the names of the variables that can be recorded in this model.
- class spynnaker.pyNN.models.neuron.implementations.NeuronImplStocExp(tau: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], bias: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], refract_init: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], seed: int | None)¶
Bases:
AbstractNeuronImplStochastic neuron model exponential threshold and instantaneous synapses, and voltage which is reset each time step.
- add_parameters(parameters: RangeDictionary) None[source]¶
Add the initial values of the parameters to the parameter holder.
- Parameters:
parameters (RangeDictionary) – A holder of the parameters
- add_state_variables(state_variables: RangeDictionary) None[source]¶
Add the initial values of the state variables to the state variables holder.
- Parameters:
state_variables (RangeDictionary) – A holder of the state variables
- get_global_weight_scale() float[source]¶
Get the weight scaling required by this model.
- Return type:
- get_n_synapse_types() int[source]¶
Get the number of synapse types supported by the model.
- Return type:
- get_recordable_data_types() Mapping[str, DataType][source]¶
Get the data type of the variables that can be recorded.
- get_recordable_units(variable: str) str[source]¶
Get the units of the given variable that can be recorded.
- Parameters:
variable (str) – The name of the variable
- get_recordable_variable_index(variable: str) int[source]¶
Get the index of the variable in the list of variables that can be recorded.
- get_recordable_variables() Sequence[str][source]¶
Get the names of the variables that can be recorded in this model.
- class spynnaker.pyNN.models.neuron.implementations.NeuronImplStocExpStable(v_init: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], v_reset: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], tau: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], tau_refrac: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], bias: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], refract_init: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], seed: int | None)¶
Bases:
AbstractNeuronImplStochastic neuron model with exponential threshold and instantaneous synapses, and voltage stays unless changed by input.
- add_parameters(parameters: RangeDictionary) None[source]¶
Add the initial values of the parameters to the parameter holder.
- Parameters:
parameters (RangeDictionary) – A holder of the parameters
- add_state_variables(state_variables: RangeDictionary) None[source]¶
Add the initial values of the state variables to the state variables holder.
- Parameters:
state_variables (RangeDictionary) – A holder of the state variables
- get_global_weight_scale() float[source]¶
Get the weight scaling required by this model.
- Return type:
- get_n_synapse_types() int[source]¶
Get the number of synapse types supported by the model.
- Return type:
- get_recordable_data_types() Mapping[str, DataType][source]¶
Get the data type of the variables that can be recorded.
- get_recordable_units(variable: str) str[source]¶
Get the units of the given variable that can be recorded.
- Parameters:
variable (str) – The name of the variable
- get_recordable_variable_index(variable: str) int[source]¶
Get the index of the variable in the list of variables that can be recorded.
- get_recordable_variables() Sequence[str][source]¶
Get the names of the variables that can be recorded in this model.
- class spynnaker.pyNN.models.neuron.implementations.NeuronImplStocSigma(tau_refrac: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], alpha: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], bias: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], refract_init: float | Iterable[float] | RandomDistribution | ndarray[tuple[int, ...], dtype[floating]], seed: int | None)¶
Bases:
AbstractNeuronImplStochastic model with sigma threshold and instantaneous synapses.
- add_parameters(parameters: RangeDictionary) None[source]¶
Add the initial values of the parameters to the parameter holder.
- Parameters:
parameters (RangeDictionary) – A holder of the parameters
- add_state_variables(state_variables: RangeDictionary) None[source]¶
Add the initial values of the state variables to the state variables holder.
- Parameters:
state_variables (RangeDictionary) – A holder of the state variables
- get_global_weight_scale() float[source]¶
Get the weight scaling required by this model.
- Return type:
- get_n_synapse_types() int[source]¶
Get the number of synapse types supported by the model.
- Return type:
- get_recordable_data_types() Mapping[str, DataType][source]¶
Get the data type of the variables that can be recorded.
- get_recordable_units(variable: str) str[source]¶
Get the units of the given variable that can be recorded.
- Parameters:
variable (str) – The name of the variable
- get_recordable_variable_index(variable: str) int[source]¶
Get the index of the variable in the list of variables that can be recorded.
- get_recordable_variables() Sequence[str][source]¶
Get the names of the variables that can be recorded in this model.