Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ''' PART 2: Activate Predicted/Matching Segments '''
- cells_activeSegs = dict()
- cells_matchingSegs = dict()
- for cell,segList in cells_segments.items():
- for seg in segList:
- segIndex = segList.index(seg)
- numActiveConnected = 0
- numActivePotential = 0
- for preSynCell,perm in seg.items():
- if preSynCell in activeCells and perm > TM_permConnectThresh:
- numActiveConnected += 1
- if preSynCell in activeCells and perm > 0:
- numActivePotential += 1
- if numActiveConnected > TM_segActiveThresh:
- cells_activeSegs[cell] = seg
- if numActivePotential > TM_segMatchingThres:
- cells_matchingSegs[cell] = seg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement