class_docstr: Callback that records events into a `History` object.
  
  This callback is automatically applied to
  every SuperModule.
class_docstr_tok: ["Callback","that","records","events","into","a","`","History","`","object",".","This","callback","is","automatically","applied","to","every","SuperModule","."]
code: def on_batch_end(self, batch, logs=None):
      for k in self.batch_metrics:
          self.batch_metrics[k] = (
              self.samples_seen * self.batch_metrics[k]
              + logs[k] * self.batch_size
          ) / (self.samples_seen + self.batch_size)
      self.samples_seen += self.batch_size
  
file_path: pywick/pywick/callbacks/History.py
imports: from .None import Callback
label_desc: Use image node_id 5 for calling the History obj's underlying member method code with example usage: obj.on_batch_end(batch, logs) without return types