sp_facade.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:nupic-history-server 作者: htm-community 项目源码 文件源码
def _conjurePotentialPools(self, **kwargs):
    # These only need to be fetched from the SP once.
    if self._potentialPools:
      return self._potentialPools
    sp = self._sp
    out = []
    for colIndex in range(0, sp.getNumColumns()):
      columnPool = self._getZeroedInput()
      columnPoolIndices = []
      sp.getPotential(colIndex, columnPool)
      for i, pool in enumerate(columnPool):
        if np.asscalar(pool) == 1.0:
          columnPoolIndices.append(i)
      out.append(columnPoolIndices)
    self._potentialPools = out
    return out
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号