spynnaker.pyNN.models.neuron.local_only package

Module contents

class spynnaker.pyNN.models.neuron.local_only.AbstractLocalOnly(delay: int | float | str | RandomDistribution | Iterable[int] | Iterable[float] | None)

Bases: AbstractSynapseDynamics

Processes synapses locally without the need for SDRAM.

Parameters:

delay (float) – 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.

Return type:

int

abstract get_parameters_usage_in_bytes(n_atoms: int, incoming_projections: Iterable[Projection]) int[source]

Get the size of the parameters in bytes.

Parameters:
  • n_atoms (int) – The number of atoms in the vertex

  • incoming_projections (list(Projection)) – The projections to get the size of

Return type:

int

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.

Return type:

bool

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

Write the parameters to the data specification for a vertex.

Parameters:
  • spec (DataSpecificationGenerator) – The specification to write to

  • region (int) – region ID to write to

  • machine_vertex (MachineVertex) – The machine vertex being targeted

  • weight_scales (list(float)) – Scale factors to apply to the weights

class spynnaker.pyNN.models.neuron.local_only.LocalOnlyConvolution(delay: int | float | str | RandomDistribution | Iterable[int] | Iterable[float] | None = None)

Bases: AbstractLocalOnly, AbstractSupportsSignedWeights

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

Parameters:

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

property changes_during_run: bool

Whether the synapses change during a run.

Return type:

bool

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

int

get_negative_synapse_index(incoming_projection: Projection) int[source]

Get the synapse type that negative weights will arrive at.

Parameters:

incoming_projection (Projection) – The projection targeted

Return type:

int

get_parameters_usage_in_bytes(n_atoms: int, incoming_projections: Iterable[Projection]) int[source]

Get the size of the parameters in bytes.

Parameters:
  • n_atoms (int) – The number of atoms in the vertex

  • incoming_projections (list(Projection)) – The projections to get the size of

Return type:

int

get_positive_synapse_index(incoming_projection: Projection) int[source]

Get the synapse type that positive weights will arrive at.

Parameters:

incoming_projection (Projection) – The projection targeted

Return type:

int

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

float

get_vertex_executable_suffix() str[source]

Get the executable suffix for a vertex for this dynamics.

Return type:

str

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 (AbstractSynapseDynamics)

Return type:

AbstractSynapseDynamics

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

Write the parameters to the data specification for a vertex.

Parameters:
  • spec (DataSpecificationGenerator) – The specification to write to

  • region (int) – region ID to write to

  • machine_vertex (MachineVertex) – The machine vertex being targeted

  • weight_scales (list(float)) – Scale factors to apply to the weights

class spynnaker.pyNN.models.neuron.local_only.LocalOnlyPoolDense(delay: int | float | str | RandomDistribution | Iterable[int] | Iterable[float] | None = None)

Bases: AbstractLocalOnly, AbstractSupportsSignedWeights

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

Parameters:

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

property changes_during_run: bool

Whether the synapses change during a run.

Return type:

bool

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

int

get_negative_synapse_index(incoming_projection: Projection) int[source]

Get the synapse type that negative weights will arrive at.

Parameters:

incoming_projection (Projection) – The projection targeted

Return type:

int

get_parameters_usage_in_bytes(n_atoms: int, incoming_projections: Iterable[Projection]) int[source]

Get the size of the parameters in bytes.

Parameters:
  • n_atoms (int) – The number of atoms in the vertex

  • incoming_projections (list(Projection)) – The projections to get the size of

Return type:

int

get_positive_synapse_index(incoming_projection: Projection) int[source]

Get the synapse type that positive weights will arrive at.

Parameters:

incoming_projection (Projection) – The projection targeted

Return type:

int

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 (Projection) – The projection targeted

Return type:

float

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 (Projection) – The projection targeted

Return type:

float

get_vertex_executable_suffix() str[source]

Get the executable suffix for a vertex for this dynamics.

Return type:

str

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 (AbstractSynapseDynamics)

Return type:

AbstractSynapseDynamics

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

Write the parameters to the data specification for a vertex.

Parameters:
  • spec (DataSpecificationGenerator) – The specification to write to

  • region (int) – region ID to write to

  • machine_vertex (MachineVertex) – The machine vertex being targeted

  • weight_scales (list(float)) – Scale factors to apply to the weights