class_docstr: The ``FaceDetector`` is a :class:`~flash.Task` for detecting faces in images.
  
  For more details, see :ref:`face_detection`.
  
  Args:
      model: a string of :attr`_models`. Defaults to 'lffd_slim'.
      pretrained: Whether the model from fastface should be loaded with it's pretrained weights.
      loss_fn: the function(s) to update the model with. Has no effect for fastface models.
      metrics: The provided metrics. All metrics here will be logged to progress bar and the respective logger.
          Changing this argument currently has no effect.
      optimizer: Optimizer to use for training.
      lr_scheduler: The LR scheduler to use during training.
      learning_rate: The learning rate to use for training.
      kwargs: additional kwargs nessesary for initializing face detector backbone
code: def validation_step(self, batch, batch_idx):
      loss = self.__shared_step(batch)
  
      self.log_dict(
          {f"val_{k}": v for k, v in loss.items()},
          on_step=True,
          on_epoch=True,
          prog_bar=True,
      )
      return loss
  
imports: from typing import Any, Iterable, List, Optional, Union
  from torch import Tensor
  from torch.nn import Module
  from flash.core.data.io.input import DataKeys
  from flash.core.model import Task
  from flash.core.utilities.imports import _FASTFACE_AVAILABLE
  from flash.core.utilities.stability import beta
  from flash.core.utilities.types import LOSS_FN_TYPE, LR_SCHEDULER_TYPE, METRICS_TYPE, OPTIMIZER_TYPE
  from flash.image.face_detection.backbones import FACE_DETECTION_BACKBONES
  from flash.image.face_detection.output_transform import FaceDetectionOutputTransform
label_desc: Use image node_id 8 for calling the FaceDetector obj's underlying member method code with example usage: obj.validation_step(batch, batch_idx) and returns: loss