IAF_encode_rt

class vtem.ensemble_encode.IAF_encode_rt(num_neurons, dt, dtype=<type 'numpy.float64'>)

Methods

encode(neural_inputs[, startbias, avg_rate]) Encode with IAFs with random thresholds
load_parameters([h_kappa, h_bias, h_delta, ...]) Load encoding parameters to GPU
reset_timer() reseting the time_count to zeros
set_initial_value() set integration from zeros
set_parameters() Set the parameters using default values
set_time_count() Set time_count to zeros
__init__(num_neurons, dt, dtype=<type 'numpy.float64'>)

Population encoding with IAF neurons with random thresholds

Parameters:

num_neurons : integer

number of neurons to encode

dt : float

time interval between two consecutive samples in the input for each neuron

dtype : type, optional

dtype of spike interval to be stored ( np.float32 not tested)

encode(neural_inputs, startbias=0, avg_rate=0.1)

Encode with IAFs with random thresholds

Parameters:

neural_inputs : PitchArray

PitchArray of shape (num_samples, num_neurons) containing inputs to all neurons

startbias : integer

the neuron index corresponding to first column of neural_inputs

avg_rate : float

average spiking rate assumed for neurons, will allocate memory num_samples/avg_rate for each neuron for storing spikes

Returns:

spikes : ndarray of self.dtype

stores the spikes for one neuron after another

spike_count : ndarray of int32 of size num_neurons

indicates the number of spikes generated by each neuron

Notes

spikes for neuron j can be accessed by

cum_count = np.concatenate((np.zeros(1,np.int32),np.cumsum(spike_count)))
tk = spikes[cum_count[j]:cum_count[j+1]]
load_parameters(h_kappa=None, h_bias=None, h_delta=None, h_sigma=None, h_delta_value=None, h_time_count=None, h_v0=None)

Load encoding parameters to GPU

h_kappa, h_bias, h_delta can be set up using default values (using None), or specified together (using ndarrays of dtype)

h_time_count can be set up using default values (using None), or specified values(using ndarrays of dtype)

h_v0 can be set up using default values (using None), or specified values(using ndarrays of dtype)

reset_timer()

reseting the time_count to zeros

set_initial_value()

set integration from zeros

set_parameters()

Set the parameters using default values

Will set kappa’s to be 1.0, deltas to be 0.03, bias to be 0.8

set_time_count()

Set time_count to zeros