code: def on_batch_begin(self, last_input, last_target, **kwargs):
          "accumulate samples and batches"
          self.acc_samples += last_input.shape[0]
          self.acc_batches += f on_batch_begin(self, last_input, last_target, **kwargs):
          "accumulate samples and batches"
          self.acc_samples += last_input.shape[0]
          self.acc_batches += 1
docs: accumulate samples and batches