How to know the number of spiked input neurons

13 views
Skip to first unread message

spike bush

unread,
Sep 12, 2017, 3:37:37 AM9/12/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hello ,
     In tutorial 4 ,We transform the gray value of the image into the excitation frequency of the input neuron.And through the  MATLAB script file, we can put different neurons at different times to respond to the situation .Now I want to know how many input neurons have actually spiked .Is there some way for us to know  the number of spiked input neurons?By the way ,in the 3.2.1 CUBA of the user guide ,there is a word "CUBA mode has synaptic currents that last for a single time step".How should we understand "a single time step".Is it equal to 1ms ?

Michael Beyeler

unread,
Sep 14, 2017, 5:26:41 PM9/14/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hi spike bush,

You may want to have a look at the different methods of the SpikeMonitor class: https://uci-carl.github.io/CARLsim3/classSpikeMonitor.html. You can easily find the number of silent neurons in a group with SpikeMonitor::getNumSilentNeurons, then the number of spiking neurons is simply all neurons in the group minus silent ones.

First, make sure you set up a SpikeMonitor for the input group (see Section 4.2.3 of Tutorial 4):

SpikeMonitor* spkMonIn = sim.setSpikeMonitor(gIn, "DEFAULT");

Then wrap the runNetwork loop in startRecording/stopRecording:

spkMonIn->startRecording();
for (int i=0; i<stim.getLength(); i++) {
   
// etc.
    sim
->runNetwork(1,0);
}
spkMonIn
->stopRecording();


After that you have access to all the SpikeMonitor analysis methods, such as:

int numSilent = spkMonIn->getNumSilentNeurons();


Regarding your CUBA question: Yes, a single time step is 1ms.

Best,
Michael


Reply all
Reply to author
Forward
0 new messages