Closed duguyue100 closed 8 years ago
@rbodo the else
s are intentional to keep the spikecounts
for avg_max
mode. If removed, avg_max
couldn't function correctly.
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.
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.
That's true, thanks for pointing it out. Please push your version to master then.
Never-mind, I just changed it.
online-normalization
scope