NeuromorphicProcessorProject / snn_toolbox

Toolbox for converting analog to spiking neural networks (ANN to SNN), and running them in a spiking neuron simulator.
MIT License
362 stars 105 forks source link

Spikemp #3

Closed duguyue100 closed 8 years ago

duguyue100 commented 8 years ago
duguyue100 commented 8 years ago

@rbodo the elses are intentional to keep the spikecounts for avg_max mode. If removed, avg_max couldn't function correctly.

rbodo commented 8 years ago

Yes, but it should be decoupled from 'online_normalization' in the if-else statement. We don't want this object to be created by default because it costs lots of memory, but only if the networks uses MaxPooling layers. For now I put it in the if-clause for MaxPool layers. But then it is also created for every conv layer even if we use Avg pooling. We could add a flag to the network description has_MaxPool==True or similar. I guess for now it's OK, we can worry about performance later.

duguyue100 commented 8 years ago

In your last commit, if online_normalization is true, then the spikecounts will be updated twice in update and reset. I'm gonna keep this else on my branch first, and I will figure out a smarter way of updating avg_spikerate instead.

rbodo commented 8 years ago

That's true, thanks for pointing it out. Please push your version to master then.

rbodo commented 8 years ago

Never-mind, I just changed it.