spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.formation package

Module contents

class spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.formation.AbstractFormation

Bases: AbstractHasParameterNames

A synaptic connection formation rule.

abstract get_parameters_sdram_usage_in_bytes() int[source]

Get the amount of SDRAM used by the parameters of this rule.

Return type:

int

abstract property vertex_executable_suffix: str

The suffix to be appended to the vertex executable for this rule.

Return type:

str

abstract write_parameters(spec: DataSpecificationGenerator)[source]

Write the parameters of the rule to the spec.

Parameters:

spec (DataSpecificationGenerator)

class spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.formation.DistanceDependentFormation(grid: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (16, 16), p_form_forward: float = 0.16, sigma_form_forward: float = 2.5, p_form_lateral: float = 1.0, sigma_form_lateral: float = 1.0)

Bases: AbstractFormation

Formation rule that depends on the physical distance between neurons.

Parameters:
  • grid (tuple(int,int) or list(int) or ndarray(int)) – (x, y) dimensions of the grid of distance

  • p_form_forward (float) – The peak probability of formation on feed-forward connections

  • sigma_form_forward (float) – The spread of probability with distance of formation on feed-forward connections

  • p_form_lateral (float) – The peak probability of formation on lateral connections

  • sigma_form_lateral (float) – The spread of probability with distance of formation on lateral connections

distance(x0: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], x1: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], metric) ndarray[Any, dtype[floating]][source]

Compute the distance between points x0 and x1 place on the grid using periodic boundary conditions.

Parameters:
  • x0 (ndarray(int)) – first point in space

  • x1 (ndarray(int)) – second point in space

  • grid (ndarray(int)) – shape of grid

  • metric (str) – distance metric, i.e. euclidian or manhattan or equidistant

Returns:

the distance

Return type:

float

generate_distance_probability_array(probability: float, sigma: float) ndarray[Any, dtype[uint16]][source]

Generate the exponentially decaying probability LUTs.

Parameters:
  • probability (float) – peak probability

  • sigma (float) – spread

Returns:

distance-dependent probabilities

Return type:

ndarray(float)

get_parameter_names() Iterable[str][source]

Get the parameter names available from the component.

Return type:

iterable(str)

get_parameters_sdram_usage_in_bytes() int[source]

Get the amount of SDRAM used by the parameters of this rule.

Return type:

int

property vertex_executable_suffix: str

The suffix to be appended to the vertex executable for this rule.

Return type:

str

write_parameters(spec: DataSpecificationBase)[source]

Write the parameters of the rule to the spec.

Parameters:

spec (DataSpecificationGenerator)