def doTimestep(self, locationSDR, transitionSDR, featureSDR,
                 egocentricLocation, learn):
    """
    Run one timestep.
    """

    for monitor in self.monitors.values():
      monitor.beforeTimestep(locationSDR, transitionSDR, featureSDR,
                             egocentricLocation, learn)

    params = {
      "newLocation": locationSDR,
      "deltaLocation": transitionSDR,
      "featureLocationInput": self.inputLayer.getActiveCells(),
      "featureLocationGrowthCandidates": self.inputLayer.getPredictedActiveCells(),
      "learn": learn,
    }
    self.locationLayer.compute(**params)
    for monitor in self.monitors.values():
      monitor.afterLocationCompute(**params)

    params = {
      "activeColumns": featureSDR,
      "basalInput": self.locationLayer.getActiveCells(),
      "apicalInput": self.objectLayer.getActiveCells(),
    }
    self.inputLayer.compute(**params)
    for monitor in self.monitors.values():
      monitor.afterInputCompute(**params)

    params = {
      "feedforwardInput": self.inputLayer.getActiveCells(),
      "feedforwardGrowthCandidates": self.inputLayer.getPredictedActiveCells(),
      "learn": learn,
    }
    self.objectLayer.compute(**params)
    for monitor in self.monitors.values():
      monitor.afterObjectCompute(**params)
def doTimestep ( self , locationSDR , transitionSDR , featureSDR , egocentricLocation , learn ) : for monitor in self . monitors . values ( ) : monitor . beforeTimestep ( locationSDR , transitionSDR , featureSDR , egocentricLocation , learn ) params = { "newLocation" : locationSDR , "deltaLocation" : transitionSDR , "featureLocationInput" : self . inputLayer . getActiveCells ( ) , "featureLocationGrowthCandidates" : self . inputLayer . getPredictedActiveCells ( ) , "learn" : learn , } self . locationLayer . compute ( ** params ) for monitor in self . monitors . values ( ) : monitor . afterLocationCompute ( ** params ) params = { "activeColumns" : featureSDR , "basalInput" : self . locationLayer . getActiveCells ( ) , "apicalInput" : self . objectLayer . getActiveCells ( ) , } self . inputLayer . compute ( ** params ) for monitor in self . monitors . values ( ) : monitor . afterInputCompute ( ** params ) params = { "feedforwardInput" : self . inputLayer . getActiveCells ( ) , "feedforwardGrowthCandidates" : self . inputLayer . getPredictedActiveCells ( ) , "learn" : learn , } self . objectLayer . compute ( ** params ) for monitor in self . monitors . values ( ) : monitor . afterObjectCompute ( ** params )
Run one timestep.