models

This module introduce some basic models which are implemented in DTB, and all of which are customized in python. This file does not have many comments, we can refer to the source code to understand it.

block

class models.block.block(node_property, w_uij, delta_t=1, src=None)[source]

Bases: object

According to the determined network structure and neuron model parameter (LIF), simulate spike neural network.

Detail ref user guide.

A cpu code to simulate the spike network with the pytorch framework and gpu accelerating. In real large-scale simulation, We use CUDA accelerated DTB platform.

Parameters:
  • node_property (Tensor) – shape=(N, 23), N denotes number of neurons,23 denotes 23 attributes of LIF neuron.

  • w_uij (Tensor) – shape=(4, N, N), 4 denotes 4 different synatpic channels: AMPA, NMDA, GABAa and GABAb.

  • delta_t (float) – Iteration time, unit: milliseconds.

  • src (Tensor) – The default is none, otherwise, tensor is used to indicate the designated neuron and the designated firing.

run(noise_rate=0.01, isolated=False)[source]

the main method in this class to evolve this spike neuronal network. Each neuron in the network is driven by an independent background synaptic noise to maintain network activity. Specifically, the background synaptic noise are modelled as uncorrelated Poisson-type spike trains. For the generation of background noise, we implement it by replacing the poission train as a simple random train.

Parameters:
  • noise_rate (float) – the frequency of background noise.

  • isolated (bool) – whether to cut off the synaptic communication in this network, but retain the background noise.

bold_model_pytorch

class models.bold_model_pytorch.BOLD(epsilon, tao_s, tao_f, tao_0, alpha, E_0, V_0, delta_t=0.001, init_f_in=None, init_s=None, init_v=None, init_q=None)[source]

Bases: object

Ballon model, transforms the fire rate (e.g., generated from block) to BOLD signal through a approximate convolutional dynamic equation. More detail, ref here.

run(u)[source]

the main method in this class to evolve this balloon model.

Parameters:

u (ndarray) – spike activity.

Returns:

bold – the shape is the same as input.

Return type:

ndarray