class_docstr: to log the loss after each batch
      
class_docstr_tok: ["to","log","the","loss","after","each","batch"]
code: def on_batch_end(self, batch, logs=None):
      self.counter += 1
      if self.counter % self.log_every == 0:
          for name, value in logs.items():
              if name in ["batch", "size"]:
                  continue
              summary = tf.Summary()
              summary_value = summary.value.add()
              summary_value.simple_value = value.item()
              summary_value.tag = name
              self.writer.add_summary(summary, self.counter)
          self.writer.flush()
  
      super(CustomTensorBoard, self).on_batch_end(batch, logs)
  
file_path: ImageAI/imageai_tf_deprecated/Detection/Custom/callbacks.py
imports: from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint
  import tensorflow
  import numpy
  import warnings
label_desc: Use image node_id 2 for calling the CustomTensorBoard obj's underlying member method code with example usage: obj.on_batch_end(batch, logs) without return types