def compute(self, bottomUpInput, enableLearn, computeInfOutput=None):
    """Computes output for both learning and inference. In both cases, the
    output is the boolean OR of activeState and predictedState at t.
    Stores currentOutput for checkPrediction."""

    if enableLearn:
      self.learn(bottomUpInput)
    else:
      self.infer(bottomUpInput)
Computes output for both learning and inference. In both cases, the
    output is the boolean OR of activeState and predictedState at t.
    Stores currentOutput for checkPrediction.