class_docstr: Base class to train the different models in kornia.
  
  .. warning::
      The API is experimental and subject to be modified based on the needs of kornia models.
  
  Args:
      model: the nn.Module to be optimized.
      train_dataloader: the data loader used in the training loop.
      valid_dataloader: the data loader used in the validation loop.
      criterion: the nn.Module with the function that computes the loss.
      optimizer: the torch optimizer object to be used during the optimization.
      scheduler: the torch scheduler object with defiing the scheduling strategy.
      accelerator: the Accelerator object to distribute the training.
      config: a TrainerConfiguration structure containing the experiment hyper parameters.
      callbacks: a dictionary containing the pointers to the functions to overrides. The
        main supported hooks are ``evaluate``, ``preprocess``, ``augmentations`` and ``fit``.
  
  .. important::
      The API heavily relies on `accelerate <https://github.com/huggingface/accelerate/>`_.
      In order to use it, you must: ``pip install kornia[x]``
  
  .. seealso::
      Learn how to use the API in our documentation
      `here <https://kornia.readthedocs.io/en/latest/get-started/training.html>`_.
code: def on_epoch_start(self, *args: Any, **kwargs: Any) -> None:
      ...
  
imports: import logging
  from typing import Any, Callable, Dict, Optional
  import torch
  from torch.optim import Optimizer, lr_scheduler
  from torch.utils.data import DataLoader
  from kornia.core import Module, Tensor
  from kornia.metrics import AverageMeter
  from .utils import Configuration, StatsTracker, TrainerState
label_desc: Use image node_id 7 for calling the Trainer obj's underlying member method code with example usage: obj.on_epoch_start() without return types