class_docstr: Callback for validation loss.
code: def on_epoch_end(self, batch, logs=None) -> None:
      if logs is None:
          logs = {}
      val_loss, count_batches_val = 0, 0
      for batch in self.val_dataset.take(-1):
          val_loss_batch = self.train_step(*batch)
          val_loss += val_loss_batch
          count_batches_val += 1
      if count_batches_val == 0:
          raise ValueError(
              "Tried to validate on empty validation dataset, possibly due to batch size "
              "exceeding validation data size."
          )
      logs["loss_val"] = float(val_loss / count_batches_val)
  
imports: from typing import Callable
  import tensorflow
  from headliner.model.summarizer import Summarizer
label_desc: Use image node_id 2 for calling the ValidationCallback obj's underlying member method code with example usage: obj.on_epoch_end(batch, logs) without return types