Exemplo n.º 1
0
def _temporal_phase3(htm, updateSegments):
    'Phase 3, p42'
    for cell in htm.cells:
        if cell.learning:
            for synapseStates in updateSegments[cell]:
                Segment.adapt_up(synapseStates)
            updateSegments.reset(cell)
        elif not cell.predicting and cell.predicted:
            for synapseStates in updateSegments[cell]:
                Segment.adapt_down(synapseStates)
            updateSegments.reset(cell)
            
    return updateSegments
Exemplo n.º 2
0
def _temporal_phase3(htm, updateSegments):
    'Phase 3, p42'
    for cell in htm.cells:
        if cell.learning:
            for synapseStates in updateSegments[cell]:
                Segment.adapt_up(synapseStates)
            updateSegments.reset(cell)
        elif not cell.predicting and cell.predicted:
            for synapseStates in updateSegments[cell]:
                Segment.adapt_down(synapseStates)
            updateSegments.reset(cell)

    return updateSegments
Exemplo n.º 3
0
 def testAdaptation(self):
     seg = Segment()
     
     #for now, just don't crash
     seg.adapt_up([])
     seg.adapt_down([])
Exemplo n.º 4
0
    def testAdaptation(self):
        seg = Segment()

        #for now, just don't crash
        seg.adapt_up([])
        seg.adapt_down([])