Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Boosting cleanup #544

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Boosting cleanup #544

wants to merge 38 commits into from

Conversation

breznak
Copy link
Member

@breznak breznak commented Jul 6, 2019

Cleanup boosting in SP.
move it into more compact methods, we now have only these:

  • boostOverlaps_()
  • (inhibition)
  • bumpUpWeakColumns_()

Where these methods are now more stand-alone.

breznak added 21 commits July 4, 2019 08:14
does not require parameter
for global it's always const max of dimensions
this results in 20% faster code!, but worse results 93,26% on MNIST
(from 95.%)
into this method.

Also remove updateDutyCycles_() and decuple it to
updateDutyCyclesOverlaps_(), and update duty cycles active (which
is a one liner)

Sugestion to disable bumpUpWeakColumns, as it brings about 0.1% better
SP results (in MNIST) but costs about 18% time!
does not require parameter
compared old/tested arrays, not the new values
the global inhibition should return numDesired active cols,
but it returns much less once sub threshold cols are removed
as inhibition is always ran first, this can be computed there.
@breznak breznak added ready SP code code enhancement, optimization, cleanup..programmer stuff labels Jul 6, 2019
@breznak breznak self-assigned this Jul 6, 2019
@ctrl-z-9000-times
Copy link
Collaborator

maybe whole boosting (replaced by #466 ?)

Actually, the synapse competition is not a boosting method. It helps boosting, by fixing a failure condition. So we will still need boosting methods after #466.

@breznak breznak mentioned this pull request Jul 12, 2019
4 tasks
@breznak breznak added in_progress and removed ready labels Jul 12, 2019
@dkeeney
Copy link

dkeeney commented Jul 25, 2019

I updated your branch with the latest master.

@dkeeney
Copy link

dkeeney commented Jul 25, 2019

By the way, we only need to do this PyPi publish on one CI, not all of them.

Copy link
Member Author

@breznak breznak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkeeney please have a look, this is just method reorganization. The results change as I fixed a condition. Need to adapt the tests yet.

This gives another 2x speedup for local inhibition. #123

//inhibition
//update inhibition radius if it's time, only changes in local inh
auto& activeVector = active.getSparse();
if(!globalInhibition_ and isUpdateRound_() and learn) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR breaks some tests (results). I think because of this change, now correct: update only IF: local & isUpdate & learning. Compare with former: https://github.com/htm-community/htm.core/pull/544/files#diff-75db947f594e8a477099a6c8bb86daa0L475

Copy link

@dkeeney dkeeney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are quite a few changes and I am not surprised that the test results are slightly different.
But if the results are close enough to correct I think the change is worth it to get that much speed increase.

As you know I don't follow the algorithms so I cannot confirm if you are doing the algorithm correctly but I have no complaint about any of the code.

@Zbysekz Zbysekz closed this Jun 26, 2020
@Zbysekz Zbysekz deleted the boosting_cleanup branch June 26, 2020 06:56
@breznak breznak restored the boosting_cleanup branch June 26, 2020 07:01
@breznak breznak reopened this Jun 26, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
code code enhancement, optimization, cleanup..programmer stuff in_progress SP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants