Connections: apply synapsesCompetition() in adaptSegment()#584
Connections: apply synapsesCompetition() in adaptSegment()#584
Conversation
instead of lower_bound, caused err in Debug. Seems faster
already used in TM makes SP 10% faster! (on MNIST 55->50s)
normally in learning.
and use it for synapsesCompetition()
This reverts commit 9a1bbf9.
src/htm/algorithms/Connections.cpp
Outdated
| } | ||
|
|
||
| //balance synapses using competition on dendrite | ||
| synapseCompetition(segment, 4, 10); //FIXME derive these numbers |
There was a problem hiding this comment.
calling synapseCompetition from adaptSegment
- this works pretty well, with synapse pruning many synapses get removed which leads to a considerable speedup
- set the min/max parameters somehow smarter
- I guess those should ideally be around stimulusThreshold ?
- the tighter the boundary, the more syns get removed, the faster SP (on MNIST) is.
- but where is the line? What is the disadvantage? I'd think too tight boundary is more prone to noice?
| void synapseCompetition( const Segment segment, | ||
| const SynapseIdx minimumSynapses, | ||
| const SynapseIdx maximumSynapses); | ||
| const SynapseIdx maximumSynapses); |
There was a problem hiding this comment.
TODO
- this should have some parametric default values
- replace (or provide overload) with percentages off the range [stimulusThreshold, maxSynapsesPerSegment]?
| const SDR &active) { | ||
| for(const auto &column : active.getSparse()) { | ||
| connections_.adaptSegment(column, input, synPermActiveInc_, synPermInactiveDec_); | ||
| connections_.adaptSegment(column, input, synPermActiveInc_, synPermInactiveDec_, true); |
There was a problem hiding this comment.
SP also does prune synapses (like TM)
- default to true/or even rm the parameter, when all use true now
|
This PR now gains importance with a problem I've discovered for NAB detector usingour HTM: htm-community/NAB#15 (comment) For this PR to be considered complete, we need to resolve "how do we choose the lower/upper bound for syn competition". Currently it is hardcoded. #584 (review) |
breznak
left a comment
There was a problem hiding this comment.
Aiming to finish this PR soon..
| } | ||
|
|
||
| //balance synapses using competition on dendrite | ||
| synapseCompetition(segment, 8, 11); //FIXME derive these numbers |
There was a problem hiding this comment.
this is the only big remaining issue - how to choose good values for these?
Any tips @ctrl-z-9000-times ?
Connections.adaptSegmentcalls newly addedsynapsesCompetitionFollow up to #466
Fixes #558