spynnaker.pyNN.models.neuron.local_only package

Module contents

class spynnaker.pyNN.models.neuron.local_only.AbstractLocalOnly(delay: float | str | RandomDistribution | Iterable[float] | ndarray[tuple[Any, ...], dtype[float64]] | None)

Bases: AbstractSynapseDynamics

Processes synapses locally without the need for SDRAM.

Parameters:

delay – The delay used in the connection; by default 1 time step

property absolute_max_atoms_per_core: int

The absolute maximum number of atoms per core.

Note

This is not constrained by the usual limits of the master population table.

abstractmethod get_parameters_usage_in_bytes(n_atoms: int, incoming_projections: Iterable[Projection]) int[source]
Parameters:
  • n_atoms – The number of atoms in the vertex

  • incoming_projections – The projections to get the size of

Returns:

The size of the parameters in bytes

property is_combined_core_capable: bool

Whether the synapse dynamics can run on a core combined with the neuron, or if a separate core is needed.

property is_split_core_capable: bool

Whether the synapse dynamics can run on a core split from the neuron, or if only a combined core is possible.

abstractmethod write_parameters(spec: DataSpecificationGenerator, region: int, machine_vertex: PopulationMachineLocalOnlyCombinedVertex, weight_scales: NDArray[floating]) None[source]

Write the parameters to the data specification for a vertex.

Parameters:
  • spec – The specification to write to

  • region – region ID to write to

  • machine_vertex – The machine vertex being targeted

  • weight_scales – Scale factors to apply to the weights

class spynnaker.pyNN.models.neuron.local_only.LocalOnlyConvolution(delay: float | str | RandomDistribution | Iterable[float] | ndarray[tuple[Any, ...], dtype[float64]] | None = None)

Bases: AbstractLocalOnly, AbstractSupportsSignedWeights

A convolution synapse dynamics that can process spikes with only DTCM.

Parameters:

delay – The delay used in the connection; by default 1 time step

property changes_during_run: bool

Whether the synapses change during a run.

get_maximum_positive_weight(incoming_projection: Projection) float[source]

Get the maximum likely positive weight.

Note

This must be a value >= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The maximum likely positive weight.

get_mean_negative_weight(incoming_projection: Projection) float[source]

Get the mean of the negative weights.

Note

This must be a value <= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The mean of the negative weights.

get_mean_positive_weight(incoming_projection: Projection) float[source]

Get the mean of the positive weights.

Note

This must be a value >= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The mean of the positive weights.

get_minimum_negative_weight(incoming_projection: Projection) float[source]

Get the minimum likely negative weight.

Note

This must be a value <= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The minimum likely negative weight

get_negative_synapse_index(incoming_projection: Projection) int[source]
Parameters:

incoming_projection – The projection targeted

Returns:

The synapse type that negative weights will arrive as.

get_parameters_usage_in_bytes(n_atoms: int, incoming_projections: Iterable[Projection]) int[source]
Parameters:
  • n_atoms – The number of atoms in the vertex

  • incoming_projections – The projections to get the size of

Returns:

The size of the parameters in bytes

get_positive_synapse_index(incoming_projection: Projection) int[source]
Parameters:

incoming_projection – The projection targeted

Returns:

The synapse type that positive weights will arrive as.

get_variance_negative_weight(incoming_projection: Projection) float[source]

Get the variance of the negative weights.

Note

This must be a value <= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The variance of the negative weights.

get_variance_positive_weight(incoming_projection: Projection) float[source]

Get the variance of the positive weights.

Note

This must be a value >= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The variance of the positive weights.

get_vertex_executable_suffix() str[source]
Returns:

The executable suffix for a vertex for this dynamics.

merge(synapse_dynamics: AbstractSynapseDynamics) LocalOnlyConvolution[source]

Merge with the given synapse_dynamics and return the result, or error if merge is not possible.

Parameters:

synapse_dynamics

Returns:

A merge of this and the given synapse_dynamics

property synapses_per_second: int

Approximate number of synapses that can be processed per second; ideally as close to the truth as possible, but underestimate would be OK. Overestimation would potentially mean having to handle more spikes than is possible, so overruns would occur.

write_parameters(spec: DataSpecificationGenerator, region: int, machine_vertex: PopulationMachineLocalOnlyCombinedVertex, weight_scales: NDArray[floating]) None[source]

Write the parameters to the data specification for a vertex.

Parameters:
  • spec – The specification to write to

  • region – region ID to write to

  • machine_vertex – The machine vertex being targeted

  • weight_scales – Scale factors to apply to the weights

class spynnaker.pyNN.models.neuron.local_only.LocalOnlyPoolDense(delay: float | str | RandomDistribution | Iterable[float] | ndarray[tuple[Any, ...], dtype[float64]] | None = None)

Bases: AbstractLocalOnly, AbstractSupportsSignedWeights

A convolution synapse dynamics that can process spikes with only DTCM.

Parameters:

delay – The delay used in the connection; by default 1 time step

property changes_during_run: bool

Whether the synapses change during a run.

get_maximum_positive_weight(incoming_projection: Projection) float[source]

Get the maximum likely positive weight.

Note

This must be a value >= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The maximum likely positive weight.

get_mean_negative_weight(incoming_projection: Projection) float[source]

Get the mean of the negative weights.

Note

This must be a value <= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The mean of the negative weights.

get_mean_positive_weight(incoming_projection: Projection) float[source]

Get the mean of the positive weights.

Note

This must be a value >= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The mean of the positive weights.

get_minimum_negative_weight(incoming_projection: Projection) float[source]

Get the minimum likely negative weight.

Note

This must be a value <= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The minimum likely negative weight

get_negative_synapse_index(incoming_projection: Projection) int[source]
Parameters:

incoming_projection – The projection targeted

Returns:

The synapse type that negative weights will arrive as.

get_parameters_usage_in_bytes(n_atoms: int, incoming_projections: Iterable[Projection]) int[source]
Parameters:
  • n_atoms – The number of atoms in the vertex

  • incoming_projections – The projections to get the size of

Returns:

The size of the parameters in bytes

get_positive_synapse_index(incoming_projection: Projection) int[source]
Parameters:

incoming_projection – The projection targeted

Returns:

The synapse type that positive weights will arrive as.

get_variance_negative_weight(incoming_projection: Projection) float[source]

Get the variance of the negative weights.

Note

This must be a value <= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The variance of the negative weights.

get_variance_positive_weight(incoming_projection: Projection) float[source]

Get the variance of the positive weights.

Note

This must be a value >= 0.

Parameters:

incoming_projection – The projection targeted

Returns:

The variance of the positive weights.

get_vertex_executable_suffix() str[source]
Returns:

The executable suffix for a vertex for this dynamics.

merge(synapse_dynamics: AbstractSynapseDynamics) LocalOnlyPoolDense[source]

Merge with the given synapse_dynamics and return the result, or error if merge is not possible.

Parameters:

synapse_dynamics

Returns:

A merge of this and the given synapse_dynamics

property synapses_per_second: int

Approximate number of synapses that can be processed per second; ideally as close to the truth as possible, but underestimate would be OK. Overestimation would potentially mean having to handle more spikes than is possible, so overruns would occur.

write_parameters(spec: DataSpecificationGenerator, region: int, machine_vertex: PopulationMachineLocalOnlyCombinedVertex, weight_scales: NDArray[floating]) None[source]

Write the parameters to the data specification for a vertex.

Parameters:
  • spec – The specification to write to

  • region – region ID to write to

  • machine_vertex – The machine vertex being targeted

  • weight_scales – Scale factors to apply to the weights