本文整理匯總了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()