当前位置: 首页>>代码示例>>Python>>正文


Python TP._initEphemerals方法代码示例

本文整理汇总了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()
开发者ID:,项目名称:,代码行数:49,代码来源:


注:本文中的nupic.research.TP.TP._initEphemerals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。