本文整理汇总了Python中nupic.research.TP.TP._initEphemerals方法的典型用法代码示例。如果您正苦于以下问题:Python TP._initEphemerals方法的具体用法?Python TP._initEphemerals怎么用?Python TP._initEphemerals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nupic.research.TP.TP
的用法示例。
在下文中一共展示了TP._initEphemerals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _initEphemerals
# 需要导入模块: from nupic.research.TP import TP [as 别名]
# 或者: from nupic.research.TP.TP import _initEphemerals [as 别名]
def _initEphemerals(self):
"""
Initialize all ephemeral members after being restored to a pickled state.
"""
TP._initEphemerals(self)
# ---------------------------------------------------------------------------------
# cells4 specific initialization
# If True, let C++ allocate memory for activeState, predictedState, and
# learnState. In this case we can retrieve copies of these states but can't
# set them directly from Python. If False, Python can allocate them as
# numpy arrays and we can pass pointers to the C++ using setStatePointers
self.allocateStatesInCPP = False
# Set this to true for debugging or accessing learning states
self.retrieveLearningStates = False
if self.makeCells4Ephemeral:
self.cells4 = Cells4(
self.numberOfCols,
self.cellsPerColumn,
self.activationThreshold,
self.minThreshold,
self.newSynapseCount,
self.segUpdateValidDuration,
self.initialPerm,
self.connectedPerm,
self.permanenceMax,
self.permanenceDec,
self.permanenceInc,
self.globalDecay,
self.doPooling,
self.seed,
self.allocateStatesInCPP,
self.checkSynapseConsistency,
)
self.cells4.setVerbosity(self.verbosity)
self.cells4.setPamLength(self.pamLength)
self.cells4.setMaxAge(self.maxAge)
self.cells4.setMaxInfBacktrack(self.maxInfBacktrack)
self.cells4.setMaxLrnBacktrack(self.maxLrnBacktrack)
self.cells4.setMaxSeqLength(self.maxSeqLength)
self.cells4.setMaxSegmentsPerCell(self.maxSegmentsPerCell)
self.cells4.setMaxSynapsesPerCell(self.maxSynapsesPerSegment)
self._setStatePointers()