GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
pygenn.genn_groups.SynapseGroup Class Reference

Class representing synaptic connection between two groups of neurons. More...

Inheritance diagram for pygenn.genn_groups.SynapseGroup:
pygenn.genn_groups.Group

Public Member Functions

def __init__ (self, name, model, weight_sharing_master=None)
 Init SynapseGroup. More...
 
def num_synapses (self)
 Number of synapses in group. More...
 
def weight_update_var_size (self)
 Size of each weight update variable. More...
 
def max_row_length (self)
 
def set_psm_var (self, var_name, values)
 Set values for a postsynaptic model variable. More...
 
def set_pre_var (self, var_name, values)
 Set values for a presynaptic variable. More...
 
def set_post_var (self, var_name, values)
 Set values for a postsynaptic variable. More...
 
def set_weight_update (self, model, param_space, var_space, pre_var_space, post_var_space)
 Set weight update model, its parameters and initial variables. More...
 
def set_post_syn (self, model, param_space, var_space)
 Set postsynaptic model, its parameters and initial variables. More...
 
def get_var_values (self, var_name)
 
def is_connectivity_init_required (self)
 
def matrix_type (self)
 Type of the projection matrix. More...
 
def matrix_type (self, matrix_type)
 
def has_procedural_connectivity (self)
 Tests whether synaptic connectivity is procedural. More...
 
def has_procedural_weights (self)
 Tests whether synaptic weights are procedural. More...
 
def is_ragged (self)
 Tests whether synaptic connectivity uses Ragged format. More...
 
def is_bitmask (self)
 Tests whether synaptic connectivity uses Bitmask format. More...
 
def is_dense (self)
 Tests whether synaptic connectivity uses dense format. More...
 
def is_toeplitz (self)
 Tests whether synaptic connectivity uses toeplitz format. More...
 
def has_individual_synapse_vars (self)
 Tests whether synaptic connectivity has individual weights. More...
 
def has_kernel_synapse_vars (self)
 Tests whether synaptic connectivity has kernel weights. More...
 
def has_individual_postsynaptic_vars (self)
 Tests whether synaptic connectivity has individual postsynaptic model variables. More...
 
def ps_target_var (self)
 Gets name of neuron input variable postsynaptic model will target. More...
 
def ps_target_var (self, var)
 Sets name of neuron input variable postsynaptic model will target. More...
 
def pre_target_var (self)
 Gets name of neuron input variable will target. More...
 
def pre_target_var (self, var)
 Sets name of neuron input variable will target. More...
 
def set_sparse_connections (self, pre_indices, post_indices)
 Set ragged format connections between two groups of neurons. More...
 
def get_sparse_pre_inds (self)
 Get presynaptic indices of synapse group connections. More...
 
def get_sparse_post_inds (self)
 Get postsynaptic indices of synapse group connections. More...
 
def set_connected_populations (self, source, target)
 Set two groups of neurons connected by this SynapseGroup. More...
 
def add_to (self, delay_steps)
 Add this SynapseGroup to the a model. More...
 
def set_psm_extra_global_param (self, param_name, param_values)
 Set extra global parameter to postsynaptic model. More...
 
def set_connectivity_extra_global_param (self, param_name, param_values)
 Set extra global parameter to connectivity initialisation snippet. More...
 
def pull_connectivity_from_device (self)
 Wrapper around GeNNModel.pull_connectivity_from_device. More...
 
def push_connectivity_to_device (self)
 Wrapper around GeNNModel.push_connectivity_to_device. More...
 
def pull_in_syn_from_device (self)
 Pull synaptic input current from device. More...
 
def push_in_syn_to_device (self)
 Push synaptic input current to device. More...
 
def pull_psm_extra_global_param_from_device (self, egp_name)
 Wrapper around GeNNModel.pull_extra_global_param_from_device. More...
 
def push_psm_extra_global_param_to_device (self, egp_name)
 Wrapper around GeNNModel.push_extra_global_param_to_device. More...
 
def load (self)
 
def load_init_egps (self)
 
def unload (self)
 
def reinitialise (self)
 Reinitialise synapse group. More...
 
- Public Member Functions inherited from pygenn.genn_groups.Group
def __init__ (self, name, model)
 Init Group. More...
 
def set_var (self, var_name, values)
 Set values for a Variable. More...
 
def add_extra_global_param (self, param_name, param_values)
 Set extra global parameter. More...
 
def set_extra_global_param (self, param_name, param_values)
 Set extra global parameter. More...
 
def pull_state_from_device (self)
 Wrapper around GeNNModel.pull_state_from_device. More...
 
def pull_var_from_device (self, var_name)
 Wrapper around GeNNModel.pull_var_from_device. More...
 
def pull_extra_global_param_from_device (self, egp_name, size=None)
 Wrapper around GeNNModel.pull_extra_global_param_from_device. More...
 
def push_state_to_device (self)
 Wrapper around GeNNModel.push_state_to_device. More...
 
def push_var_to_device (self, var_name)
 Wrapper around GeNNModel.push_var_to_device. More...
 
def push_extra_global_param_to_device (self, egp_name, size=None)
 Wrapper around GeNNModel.push_extra_global_param_to_device. More...
 

Public Attributes

 connections_set
 
 w_update
 
 postsyn
 
 src
 
 trg
 
 psm_vars
 
 pre_vars
 
 post_vars
 
 psm_extra_global_params
 
 connectivity_extra_global_params
 
 connectivity_initialiser
 
 toeplitz_connectivity_initialiser
 
 weight_sharing_master
 
 in_syn
 
 wu_pre_var_names
 
 wu_post_var_names
 
 synapse_order
 
 ind
 
 row_lengths
 
 pop
 
- Public Attributes inherited from pygenn.genn_groups.Group
 name
 
 vars
 
 extra_global_params
 

Detailed Description

Class representing synaptic connection between two groups of neurons.

Constructor & Destructor Documentation

◆ __init__()

def pygenn.genn_groups.SynapseGroup.__init__ (   self,
  name,
  model,
  weight_sharing_master = None 
)

Init SynapseGroup.

Parameters
namestring name of the group
modelpygenn.genn_model.GeNNModel this synapse group is part of
weight_sharing_masterSynapseGroup this synapse group is a slave of

Member Function Documentation

◆ add_to()

def pygenn.genn_groups.SynapseGroup.add_to (   self,
  delay_steps 
)

Add this SynapseGroup to the a model.

Parameters
delay_stepsnumber of axonal delay timesteps to simulate for this synapse group

◆ get_sparse_post_inds()

def pygenn.genn_groups.SynapseGroup.get_sparse_post_inds (   self)

Get postsynaptic indices of synapse group connections.

Returns
ndarrays of postsynaptic indices

◆ get_sparse_pre_inds()

def pygenn.genn_groups.SynapseGroup.get_sparse_pre_inds (   self)

Get presynaptic indices of synapse group connections.

Returns
ndarray of presynaptic indices

◆ get_var_values()

def pygenn.genn_groups.SynapseGroup.get_var_values (   self,
  var_name 
)

◆ has_individual_postsynaptic_vars()

def pygenn.genn_groups.SynapseGroup.has_individual_postsynaptic_vars (   self)

Tests whether synaptic connectivity has individual postsynaptic model variables.

◆ has_individual_synapse_vars()

def pygenn.genn_groups.SynapseGroup.has_individual_synapse_vars (   self)

Tests whether synaptic connectivity has individual weights.

◆ has_kernel_synapse_vars()

def pygenn.genn_groups.SynapseGroup.has_kernel_synapse_vars (   self)

Tests whether synaptic connectivity has kernel weights.

◆ has_procedural_connectivity()

def pygenn.genn_groups.SynapseGroup.has_procedural_connectivity (   self)

Tests whether synaptic connectivity is procedural.

◆ has_procedural_weights()

def pygenn.genn_groups.SynapseGroup.has_procedural_weights (   self)

Tests whether synaptic weights are procedural.

◆ is_bitmask()

def pygenn.genn_groups.SynapseGroup.is_bitmask (   self)

Tests whether synaptic connectivity uses Bitmask format.

◆ is_connectivity_init_required()

def pygenn.genn_groups.SynapseGroup.is_connectivity_init_required (   self)

◆ is_dense()

def pygenn.genn_groups.SynapseGroup.is_dense (   self)

Tests whether synaptic connectivity uses dense format.

◆ is_ragged()

def pygenn.genn_groups.SynapseGroup.is_ragged (   self)

Tests whether synaptic connectivity uses Ragged format.

◆ is_toeplitz()

def pygenn.genn_groups.SynapseGroup.is_toeplitz (   self)

Tests whether synaptic connectivity uses toeplitz format.

◆ load()

def pygenn.genn_groups.SynapseGroup.load (   self)

◆ load_init_egps()

def pygenn.genn_groups.SynapseGroup.load_init_egps (   self)

◆ matrix_type() [1/2]

def pygenn.genn_groups.SynapseGroup.matrix_type (   self)

Type of the projection matrix.

◆ matrix_type() [2/2]

def pygenn.genn_groups.SynapseGroup.matrix_type (   self,
  matrix_type 
)

◆ max_row_length()

def pygenn.genn_groups.SynapseGroup.max_row_length (   self)

◆ num_synapses()

def pygenn.genn_groups.SynapseGroup.num_synapses (   self)

Number of synapses in group.

◆ pre_target_var() [1/2]

def pygenn.genn_groups.SynapseGroup.pre_target_var (   self)

Gets name of neuron input variable will target.

◆ pre_target_var() [2/2]

def pygenn.genn_groups.SynapseGroup.pre_target_var (   self,
  var 
)

Sets name of neuron input variable will target.

◆ ps_target_var() [1/2]

def pygenn.genn_groups.SynapseGroup.ps_target_var (   self)

Gets name of neuron input variable postsynaptic model will target.

◆ ps_target_var() [2/2]

def pygenn.genn_groups.SynapseGroup.ps_target_var (   self,
  var 
)

Sets name of neuron input variable postsynaptic model will target.

◆ pull_connectivity_from_device()

def pygenn.genn_groups.SynapseGroup.pull_connectivity_from_device (   self)

◆ pull_in_syn_from_device()

def pygenn.genn_groups.SynapseGroup.pull_in_syn_from_device (   self)

Pull synaptic input current from device.

◆ pull_psm_extra_global_param_from_device()

def pygenn.genn_groups.SynapseGroup.pull_psm_extra_global_param_from_device (   self,
  egp_name 
)

Wrapper around GeNNModel.pull_extra_global_param_from_device.

Parameters
egp_namestring with the name of the variable

◆ push_connectivity_to_device()

def pygenn.genn_groups.SynapseGroup.push_connectivity_to_device (   self)

◆ push_in_syn_to_device()

def pygenn.genn_groups.SynapseGroup.push_in_syn_to_device (   self)

Push synaptic input current to device.

◆ push_psm_extra_global_param_to_device()

def pygenn.genn_groups.SynapseGroup.push_psm_extra_global_param_to_device (   self,
  egp_name 
)

Wrapper around GeNNModel.push_extra_global_param_to_device.

Parameters
egp_namestring with the name of the variable

◆ reinitialise()

def pygenn.genn_groups.SynapseGroup.reinitialise (   self)

Reinitialise synapse group.

◆ set_connected_populations()

def pygenn.genn_groups.SynapseGroup.set_connected_populations (   self,
  source,
  target 
)

Set two groups of neurons connected by this SynapseGroup.

Parameters
sourcestring name of the presynaptic neuron group
targetstring name of the postsynaptic neuron group

◆ set_connectivity_extra_global_param()

def pygenn.genn_groups.SynapseGroup.set_connectivity_extra_global_param (   self,
  param_name,
  param_values 
)

Set extra global parameter to connectivity initialisation snippet.

Parameters
param_namestring with the name of the extra global parameter
param_valuesiterable or a single value

◆ set_post_syn()

def pygenn.genn_groups.SynapseGroup.set_post_syn (   self,
  model,
  param_space,
  var_space 
)

Set postsynaptic model, its parameters and initial variables.

Parameters
modeltype as string of intance of the model
param_spacedict with model parameters
var_spacedict with model variables

◆ set_post_var()

def pygenn.genn_groups.SynapseGroup.set_post_var (   self,
  var_name,
  values 
)

Set values for a postsynaptic variable.

Parameters
var_namestring with the name of the presynaptic variable
valuesiterable or a single value

◆ set_pre_var()

def pygenn.genn_groups.SynapseGroup.set_pre_var (   self,
  var_name,
  values 
)

Set values for a presynaptic variable.

Parameters
var_namestring with the name of the presynaptic variable
valuesiterable or a single value

◆ set_psm_extra_global_param()

def pygenn.genn_groups.SynapseGroup.set_psm_extra_global_param (   self,
  param_name,
  param_values 
)

Set extra global parameter to postsynaptic model.

Parameters
param_namestring with the name of the extra global parameter
param_valuesiterable or a single value

◆ set_psm_var()

def pygenn.genn_groups.SynapseGroup.set_psm_var (   self,
  var_name,
  values 
)

Set values for a postsynaptic model variable.

Parameters
var_namestring with the name of the postsynaptic model variable
valuesiterable or a single value

◆ set_sparse_connections()

def pygenn.genn_groups.SynapseGroup.set_sparse_connections (   self,
  pre_indices,
  post_indices 
)

Set ragged format connections between two groups of neurons.

Parameters
pre_indicesndarray of presynaptic indices
post_indicesndarray of postsynaptic indices

◆ set_weight_update()

def pygenn.genn_groups.SynapseGroup.set_weight_update (   self,
  model,
  param_space,
  var_space,
  pre_var_space,
  post_var_space 
)

Set weight update model, its parameters and initial variables.

Parameters
modeltype as string of intance of the model
param_spacedict with model parameters
var_spacedict with model variables
pre_var_spacedict with model presynaptic variables
post_var_spacedict with model postsynaptic variables

◆ unload()

def pygenn.genn_groups.SynapseGroup.unload (   self)

◆ weight_update_var_size()

def pygenn.genn_groups.SynapseGroup.weight_update_var_size (   self)

Size of each weight update variable.

Member Data Documentation

◆ connections_set

pygenn.genn_groups.SynapseGroup.connections_set

◆ connectivity_extra_global_params

pygenn.genn_groups.SynapseGroup.connectivity_extra_global_params

◆ connectivity_initialiser

pygenn.genn_groups.SynapseGroup.connectivity_initialiser

◆ in_syn

pygenn.genn_groups.SynapseGroup.in_syn

◆ ind

pygenn.genn_groups.SynapseGroup.ind

◆ pop

pygenn.genn_groups.SynapseGroup.pop

◆ post_vars

pygenn.genn_groups.SynapseGroup.post_vars

◆ postsyn

pygenn.genn_groups.SynapseGroup.postsyn

◆ pre_vars

pygenn.genn_groups.SynapseGroup.pre_vars

◆ psm_extra_global_params

pygenn.genn_groups.SynapseGroup.psm_extra_global_params

◆ psm_vars

pygenn.genn_groups.SynapseGroup.psm_vars

◆ row_lengths

pygenn.genn_groups.SynapseGroup.row_lengths

◆ src

pygenn.genn_groups.SynapseGroup.src

◆ synapse_order

pygenn.genn_groups.SynapseGroup.synapse_order

◆ toeplitz_connectivity_initialiser

pygenn.genn_groups.SynapseGroup.toeplitz_connectivity_initialiser

◆ trg

pygenn.genn_groups.SynapseGroup.trg

◆ w_update

pygenn.genn_groups.SynapseGroup.w_update

◆ weight_sharing_master

pygenn.genn_groups.SynapseGroup.weight_sharing_master

◆ wu_post_var_names

pygenn.genn_groups.SynapseGroup.wu_post_var_names

◆ wu_pre_var_names

pygenn.genn_groups.SynapseGroup.wu_pre_var_names

The documentation for this class was generated from the following file: