code: def _updateAvgLearnedSeqLength(self, prevSeqLength):
      
      if self.lrnIterationIdx < 100:
        alpha = 0.5
      else:
        alpha = 0.1
  
      self.avgLearnedSeqLength = ((1.0 - alpha) * self.avgLearnedSeqLength +
                                  (alpha * prevSeqLength))
docs: Update our moving average of learned sequence length.