Giter Club home page Giter Club logo

Comments (5)

chetan51 avatar chetan51 commented on September 13, 2024

@subutai When you say "bug fix", what bug are you referring to?

from htmresearch.

subutai avatar subutai commented on September 13, 2024

Sorry I left out the actual bug fix in that snippet! I think the previous version of the code did not go through self.getBestMatchingSegment if self.learnOnOneCell is True and after the learn cell was chosen. If you chose the previously learning cell, you should try to find the best matching segment otherwise you will always create a new one.

The code snippet is:

        if self.learnOnOneCell == True:
          # in learn on one cell mode, always learn on one cell per column
          # unless reset has just been called
          i = self.getSeqLearnCell(c)

        if not i:
          i,s = self.getBestMatchingCell(c,self.activeState['t-1'],
                                         self.distalDendriticInput['t-1'])

          if s is not None and s.isSequenceSegment():
            s.totalActivations += 1      # activationFrequency
            s.lastActiveIteration = self.iterationIdx
          else:
            # if best matching cell does not exist, then get least used cell
            i = self.getLeastUsedCell(c)


        else:
          # If we get back i, then we should find its best matching segment
          # if it exists
          s = self.getBestMatchingSegment(c, i, self.activeState['t-1'],
                                         self.distalDendriticInput['t-1'])

from htmresearch.

chetan51 avatar chetan51 commented on September 13, 2024

@subutai If this bug exists, the temporal memory won't learn and predict anything, right? I tested this, by introducing the bug into learn_on_one_cell_temporal_memory.py, and all the existing tests failed, because nothing was ever predicted. Do we need to explicitly test for this case, or are the existing tests enough?

(This is assuming that connectedPermanence > initialPermanence in the tests.)

from htmresearch.

subutai avatar subutai commented on September 13, 2024

Hmm, I see. All the old scripts used to pass without this change. This fix is needed only when you do slow learning. If our tests all use slow learning now, I guess it is fine to not make any additional tests.

from htmresearch.

chetan51 avatar chetan51 commented on September 13, 2024

Then maybe we can think of it as, "a good way to test this fix is to have a test for slow learning"? After all, that is the functional effect of this fix. As long as we have that, we're good.

from htmresearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.