class_docstr: Training callback which allows collecting batch training times. The primary use is epoch training time estimation in adaptive epoch number selection.
class_docstr_tok: ["Training","callback","which","allows","collecting","batch","training","times",".","The","primary","use","is","epoch","training","time","estimation","in","adaptive","epoch","number","selection","."]
code: def after_batch(self):
      self.batches_finished += 1
      if self.batches_finished == 1:
          # skip first batch due to initialization overhead
          self.batch_start_time = self._time_now()
      if self.batches_finished > self.batches_to_measure:
          self.batch_measured_time = (
              self._time_now() - self.batch_start_time
          ) / self.batches_to_measure
          raise CancelFitException()
  
imports: import logging
  import time
  import numpy
  from fastai.callback.core import Callback, CancelFitException
  from fastai.callback.tracker import TrackerCallback
  from fastcore.basics import store_attr
label_desc: Use image node_id 2 for calling the BatchTimeTracker obj's underlying member method code with example usage: obj.after_batch() without return types