本文整理汇总了Python中nupic.vision.regions.ImageSensorExplorers.BaseExplorer.BaseExplorer.seek方法的典型用法代码示例。如果您正苦于以下问题:Python BaseExplorer.seek方法的具体用法?Python BaseExplorer.seek怎么用?Python BaseExplorer.seek使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nupic.vision.regions.ImageSensorExplorers.BaseExplorer.BaseExplorer
的用法示例。
在下文中一共展示了BaseExplorer.seek方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: seek
# 需要导入模块: from nupic.vision.regions.ImageSensorExplorers.BaseExplorer import BaseExplorer [as 别名]
# 或者: from nupic.vision.regions.ImageSensorExplorers.BaseExplorer.BaseExplorer import seek [as 别名]
def seek(self, iteration=None, position=None):
"""Seek to the specified position or iteration.
ImageSensor checks validity of inputs, checks that one (but not both) of
position and iteration are None, and checks that if position is not None,
at least one of its values is not None.
Updates value of position.
:param iteration: Target iteration number (or None).
:param position: Target position (or None).
"""
# Zero out the history when seeking to iteration 0. This so we can replicate
# how random explorers behave in the vision framework and NVT.
if iteration is not None and iteration == 0:
if not self.replacement:
self.history = []
BaseExplorer.seek(self, iteration=iteration, position=position)