GeNN
3.3.0
GPU enhanced Neuronal Networks (GeNN)
|
GeNNModel class This class helps to define, build and run a GeNN model from python. More...
Public Member Functions | |
def | __init__ (self, precision=None, model_name="GeNNModel", enable_debug=False, backend=None) |
Init GeNNModel. More... | |
def | use_backend (self) |
def | use_backend (self, backend) |
def | default_var_location (self) |
Default variable location - defines where state variables are initialised. More... | |
def | default_var_location (self, location) |
def | default_sparse_connectivity_location (location) |
Default sparse connectivity mode - where connectivity is initialised. More... | |
def | default_sparse_connectivity_location (self, location) |
def | model_name (self) |
Name of the model. More... | |
def | model_name (self, model_name) |
def | t (self) |
Simulation time in ms. More... | |
def | t (self, t) |
def | timestep (self) |
Simulation time step. More... | |
def | timestep (self, timestep) |
def | dT (self) |
Step size. More... | |
def | dT (self, dt) |
def | add_neuron_population (self, pop_name, num_neurons, neuron, param_space, var_space) |
Add a neuron population to the GeNN model. More... | |
def | add_synapse_population (self, pop_name, matrix_type, delay_steps, source, target, w_update_model, wu_param_space, wu_var_space, wu_pre_var_space, wu_post_var_space, postsyn_model, ps_param_space, ps_var_space, connectivity_initialiser=None) |
Add a synapse population to the GeNN model. More... | |
def | add_current_source (self, cs_name, current_source_model, pop_name, param_space, var_space) |
Add a current source to the GeNN model. More... | |
def | build (self, path_to_model="./") |
Finalize and build a GeNN model. More... | |
def | load (self) |
import the model as shared library and initialize it More... | |
def | reinitialise (self) |
reinitialise model to its original state without re-loading More... | |
def | step_time (self) |
def | pull_state_from_device (self, pop_name) |
Pull state from the device for a given population. More... | |
def | pull_spikes_from_device (self, pop_name) |
Pull spikes from the device for a given population. More... | |
def | pull_current_spikes_from_device (self, pop_name) |
Pull spikes from the device for a given population. More... | |
def | push_state_to_device (self, pop_name) |
Push state to the device for a given population. More... | |
def | push_spikes_to_device (self, pop_name) |
Push spikes from the device for a given population. More... | |
def | push_current_spikes_from_device (self, pop_name) |
Push spikes from the device for a given population. More... | |
def | end (self) |
Free memory. More... | |
def | __init__ (self, precision=None, model_name="GeNNModel", enable_debug=False, cpu=None) |
Init GeNNModel. More... | |
def | use_cpu (self) |
def | use_cpu (self, cpu) |
def | default_var_mode (self) |
Default variable mode - defines how and where state variables are initialised. More... | |
def | default_var_mode (self, mode) |
def | default_sparse_connectivity_mode (self) |
Default sparse connectivity mode - how and where connectivity is initialised. More... | |
def | default_sparse_connectivity_mode (self, mode) |
def | model_name (self) |
Name of the model. More... | |
def | model_name (self, model_name) |
def | t (self) |
Simulation time in ms. More... | |
def | t (self, t) |
def | timestep (self) |
Simulation time step. More... | |
def | timestep (self, timestep) |
def | dT (self) |
Step size. More... | |
def | dT (self, dt) |
def | add_neuron_population (self, pop_name, num_neurons, neuron, param_space, var_space) |
Add a neuron population to the GeNN model. More... | |
def | add_synapse_population (self, pop_name, matrix_type, delay_steps, source, target, w_update_model, wu_param_space, wu_var_space, wu_pre_var_space, wu_post_var_space, postsyn_model, ps_param_space, ps_var_space, connectivity_initialiser=None) |
Add a synapse population to the GeNN model. More... | |
def | add_current_source (self, cs_name, current_source_model, pop_name, param_space, var_space) |
Add a current source to the GeNN model. More... | |
def | build (self, path_to_model="./") |
Finalize and build a GeNN model. More... | |
def | load (self) |
import the model as shared library and initialize it More... | |
def | reinitialise (self) |
reinitialise model to its original state without re-loading More... | |
def | step_time (self) |
Make one simulation step. More... | |
def | pull_state_from_device (self, pop_name) |
Pull state from the device for a given population. More... | |
def | pull_spikes_from_device (self, pop_name) |
Pull spikes from the device for a given population. More... | |
def | pull_current_spikes_from_device (self, pop_name) |
Pull spikes from the device for a given population. More... | |
def | push_state_to_device (self, pop_name) |
Push state to the device for a given population. More... | |
def | push_spikes_to_device (self, pop_name) |
Push spikes from the device for a given population. More... | |
def | push_current_spikes_from_device (self, pop_name) |
Push spikes from the device for a given population. More... | |
def | end (self) |
Free memory. More... | |
Public Attributes | |
use_backend | |
default_var_location | |
model_name | |
neuron_populations | |
synapse_populations | |
current_sources | |
dT | |
T | |
use_cpu | |
default_var_mode | |
step_time | |
GeNNModel class This class helps to define, build and run a GeNN model from python.
def pygenn.genn_model.GeNNModel.__init__ | ( | self, | |
precision = None , |
|||
model_name = "GeNNModel" , |
|||
enable_debug = False , |
|||
backend = None |
|||
) |
Init GeNNModel.
precision | string precision as string ("float", "double" or "long double"). defaults to float. |
model_name | string name of the model. Defaults to "GeNNModel". |
enable_debug | boolean enable debug mode. Disabled by default. |
backend | string specifying name of backend module to use Defaults to None to pick 'best' backend for your system |
def pygenn.genn_model.GeNNModel.__init__ | ( | self, | |
precision = None , |
|||
model_name = "GeNNModel" , |
|||
enable_debug = False , |
|||
cpu = None |
|||
) |
Init GeNNModel.
precision | string precision as string ("float", "double" or "long double"). defaults to float. |
model_name | string name of the model. Defaults to "GeNNModel". |
enable_debug | boolean enable debug mode. Disabled by default. |
cpu | boolean whether GeNN should use CPU. Defaults to None to defer to whether module was built without GPU support. |
def pygenn.genn_model.GeNNModel.add_current_source | ( | self, | |
cs_name, | |||
current_source_model, | |||
pop_name, | |||
param_space, | |||
var_space | |||
) |
Add a current source to the GeNN model.
cs_name | name of the new current source |
current_source_model | type of the CurrentSourceModels class as string or instance of CurrentSourceModels class derived from CurrentSourceModels::Custom class sa createCustomCurrentSourceClass |
pop_name | name of the population into which the current source should be injected |
param_space | dict with param values for the CurrentSourceModels class |
var_space | dict with initial variable values for the CurrentSourceModels class |
def pygenn.genn_model.GeNNModel.add_current_source | ( | self, | |
cs_name, | |||
current_source_model, | |||
pop_name, | |||
param_space, | |||
var_space | |||
) |
Add a current source to the GeNN model.
cs_name | name of the new current source |
current_source_model | type of the CurrentSourceModels class as string or instance of CurrentSourceModels class derived from CurrentSourceModels::Custom class sa createCustomCurrentSourceClass |
pop_name | name of the population into which the current source should be injected |
param_space | dict with param values for the CurrentSourceModels class |
var_space | dict with initial variable values for the CurrentSourceModels class |
def pygenn.genn_model.GeNNModel.add_neuron_population | ( | self, | |
pop_name, | |||
num_neurons, | |||
neuron, | |||
param_space, | |||
var_space | |||
) |
Add a neuron population to the GeNN model.
pop_name | name of the new population |
num_neurons | number of neurons in the new population |
neuron | type of the NeuronModels class as string or instance of neuron class derived from NeuronModels::Custom class. sa create_custom_neuron_class |
param_space | dict with param values for the NeuronModels class |
var_space | dict with initial variable values for the NeuronModels class |
def pygenn.genn_model.GeNNModel.add_neuron_population | ( | self, | |
pop_name, | |||
num_neurons, | |||
neuron, | |||
param_space, | |||
var_space | |||
) |
Add a neuron population to the GeNN model.
pop_name | name of the new population |
num_neurons | number of neurons in the new population |
neuron | type of the NeuronModels class as string or instance of neuron class derived from NeuronModels::Custom class. sa create_custom_neuron_class |
param_space | dict with param values for the NeuronModels class |
var_space | dict with initial variable values for the NeuronModels class |
def pygenn.genn_model.GeNNModel.add_synapse_population | ( | self, | |
pop_name, | |||
matrix_type, | |||
delay_steps, | |||
source, | |||
target, | |||
w_update_model, | |||
wu_param_space, | |||
wu_var_space, | |||
wu_pre_var_space, | |||
wu_post_var_space, | |||
postsyn_model, | |||
ps_param_space, | |||
ps_var_space, | |||
connectivity_initialiser = None |
|||
) |
Add a synapse population to the GeNN model.
pop_name | name of the new population |
matrix_type | type of the matrix as string |
delay_steps | delay in number of steps |
source | source neuron group |
target | target neuron group |
w_update_model | type of the WeightUpdateModels class as string or instance of weight update model class derived from WeightUpdateModels::Custom class. sa createCustomWeightUpdateClass |
wu_param_values | dict with param values for the WeightUpdateModels class |
wu_init_var_values | dict with initial variable values for the WeightUpdateModels class |
postsyn_model | type of the PostsynapticModels class as string or instance of postsynaptic model class derived from PostsynapticModels::Custom class. sa create_custom_postsynaptic_class |
postsyn_param_values | dict with param values for the PostsynapticModels class |
postsyn_init_var_values | dict with initial variable values for the PostsynapticModels class |
connectivity_initialiser | InitSparseConnectivitySnippet::Init for connectivity |
def pygenn.genn_model.GeNNModel.add_synapse_population | ( | self, | |
pop_name, | |||
matrix_type, | |||
delay_steps, | |||
source, | |||
target, | |||
w_update_model, | |||
wu_param_space, | |||
wu_var_space, | |||
wu_pre_var_space, | |||
wu_post_var_space, | |||
postsyn_model, | |||
ps_param_space, | |||
ps_var_space, | |||
connectivity_initialiser = None |
|||
) |
Add a synapse population to the GeNN model.
pop_name | name of the new population |
matrix_type | type of the matrix as string |
delay_steps | delay in number of steps |
source | source neuron group |
target | target neuron group |
w_update_model | type of the WeightUpdateModels class as string or instance of weight update model class derived from WeightUpdateModels::Custom class. sa createCustomWeightUpdateClass |
wu_param_values | dict with param values for the WeightUpdateModels class |
wu_init_var_values | dict with initial variable values for the WeightUpdateModels class |
postsyn_model | type of the PostsynapticModels class as string or instance of postsynaptic model class derived from PostsynapticModels::Custom class. sa create_custom_postsynaptic_class |
postsyn_param_values | dict with param values for the PostsynapticModels class |
postsyn_init_var_values | dict with initial variable values for the PostsynapticModels class |
connectivity_initialiser | InitSparseConnectivitySnippet::Init for connectivity |
def pygenn.genn_model.GeNNModel.build | ( | self, | |
path_to_model = "./" |
|||
) |
Finalize and build a GeNN model.
path_to_model | path where to place the generated model code. Defaults to the local directory. |
def pygenn.genn_model.GeNNModel.build | ( | self, | |
path_to_model = "./" |
|||
) |
Finalize and build a GeNN model.
path_to_model | path where to place the generated model code. Defaults to the local directory. |
def pygenn.genn_model.GeNNModel.default_sparse_connectivity_location | ( | location | ) |
Default sparse connectivity mode - where connectivity is initialised.
def pygenn.genn_model.GeNNModel.default_sparse_connectivity_location | ( | self, | |
location | |||
) |
def pygenn.genn_model.GeNNModel.default_sparse_connectivity_mode | ( | self | ) |
Default sparse connectivity mode - how and where connectivity is initialised.
def pygenn.genn_model.GeNNModel.default_sparse_connectivity_mode | ( | self, | |
mode | |||
) |
def pygenn.genn_model.GeNNModel.default_var_location | ( | self | ) |
Default variable location - defines where state variables are initialised.
def pygenn.genn_model.GeNNModel.default_var_location | ( | self, | |
location | |||
) |
def pygenn.genn_model.GeNNModel.default_var_mode | ( | self | ) |
Default variable mode - defines how and where state variables are initialised.
def pygenn.genn_model.GeNNModel.default_var_mode | ( | self, | |
mode | |||
) |
def pygenn.genn_model.GeNNModel.dT | ( | self | ) |
Step size.
def pygenn.genn_model.GeNNModel.dT | ( | self, | |
dt | |||
) |
def pygenn.genn_model.GeNNModel.dT | ( | self | ) |
Step size.
def pygenn.genn_model.GeNNModel.dT | ( | self, | |
dt | |||
) |
def pygenn.genn_model.GeNNModel.end | ( | self | ) |
Free memory.
def pygenn.genn_model.GeNNModel.end | ( | self | ) |
Free memory.
def pygenn.genn_model.GeNNModel.load | ( | self | ) |
import the model as shared library and initialize it
def pygenn.genn_model.GeNNModel.load | ( | self | ) |
import the model as shared library and initialize it
def pygenn.genn_model.GeNNModel.model_name | ( | self | ) |
Name of the model.
def pygenn.genn_model.GeNNModel.model_name | ( | self, | |
model_name | |||
) |
def pygenn.genn_model.GeNNModel.model_name | ( | self | ) |
Name of the model.
def pygenn.genn_model.GeNNModel.model_name | ( | self, | |
model_name | |||
) |
def pygenn.genn_model.GeNNModel.pull_current_spikes_from_device | ( | self, | |
pop_name | |||
) |
Pull spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.pull_current_spikes_from_device | ( | self, | |
pop_name | |||
) |
Pull spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.pull_spikes_from_device | ( | self, | |
pop_name | |||
) |
Pull spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.pull_spikes_from_device | ( | self, | |
pop_name | |||
) |
Pull spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.pull_state_from_device | ( | self, | |
pop_name | |||
) |
Pull state from the device for a given population.
def pygenn.genn_model.GeNNModel.pull_state_from_device | ( | self, | |
pop_name | |||
) |
Pull state from the device for a given population.
def pygenn.genn_model.GeNNModel.push_current_spikes_from_device | ( | self, | |
pop_name | |||
) |
Push spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.push_current_spikes_from_device | ( | self, | |
pop_name | |||
) |
Push spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.push_spikes_to_device | ( | self, | |
pop_name | |||
) |
Push spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.push_spikes_to_device | ( | self, | |
pop_name | |||
) |
Push spikes from the device for a given population.
def pygenn.genn_model.GeNNModel.push_state_to_device | ( | self, | |
pop_name | |||
) |
Push state to the device for a given population.
def pygenn.genn_model.GeNNModel.push_state_to_device | ( | self, | |
pop_name | |||
) |
Push state to the device for a given population.
def pygenn.genn_model.GeNNModel.reinitialise | ( | self | ) |
reinitialise model to its original state without re-loading
def pygenn.genn_model.GeNNModel.reinitialise | ( | self | ) |
reinitialise model to its original state without re-loading
def pygenn.genn_model.GeNNModel.step_time | ( | self | ) |
Make one simulation step.
def pygenn.genn_model.GeNNModel.step_time | ( | self | ) |
def pygenn.genn_model.GeNNModel.t | ( | self | ) |
Simulation time in ms.
def pygenn.genn_model.GeNNModel.t | ( | self, | |
t | |||
) |
def pygenn.genn_model.GeNNModel.t | ( | self | ) |
Simulation time in ms.
def pygenn.genn_model.GeNNModel.t | ( | self, | |
t | |||
) |
def pygenn.genn_model.GeNNModel.timestep | ( | self | ) |
Simulation time step.
def pygenn.genn_model.GeNNModel.timestep | ( | self, | |
timestep | |||
) |
def pygenn.genn_model.GeNNModel.timestep | ( | self | ) |
Simulation time step.
def pygenn.genn_model.GeNNModel.timestep | ( | self, | |
timestep | |||
) |
def pygenn.genn_model.GeNNModel.use_backend | ( | self | ) |
def pygenn.genn_model.GeNNModel.use_backend | ( | self, | |
backend | |||
) |
def pygenn.genn_model.GeNNModel.use_cpu | ( | self | ) |
def pygenn.genn_model.GeNNModel.use_cpu | ( | self, | |
cpu | |||
) |
pygenn.genn_model.GeNNModel.current_sources |
pygenn.genn_model.GeNNModel.default_var_location |
pygenn.genn_model.GeNNModel.default_var_mode |
pygenn.genn_model.GeNNModel.dT |
pygenn.genn_model.GeNNModel.model_name |
pygenn.genn_model.GeNNModel.neuron_populations |
pygenn.genn_model.GeNNModel.step_time |
pygenn.genn_model.GeNNModel.synapse_populations |
pygenn.genn_model.GeNNModel.T |
pygenn.genn_model.GeNNModel.use_backend |
pygenn.genn_model.GeNNModel.use_cpu |