code: def __init__(
      self, num_classes, zero_infinity=False, reduction="mean_batch"
  ):
      self._blank = num_classes
      # Don't forget to properly call base constructor
      if reduction not in [
          "none",
          "mean",
          "sum",
          "mean_batch",
          "mean_volume",
      ]:
          raise ValueError(
              "`reduction` must be one of [mean, sum, mean_batch, mean_volume]"
          )
  
      self.config_reduction = reduction
      if reduction == "mean_batch" or reduction == "mean_volume":
          ctc_reduction = "none"
          self._apply_reduction = True
      elif reduction in ["sum", "mean", "none"]:
          ctc_reduction = reduction
          self._apply_reduction = False
      super().__init__(
          blank=self._blank,
          reduction=ctc_reduction,
          zero_infinity=zero_infinity,
      )
  
file_path: NeMo/nemo/collections/asr/losses/ctc.py
imports: import torch
  from torch import nn
  from nemo.core.classes import Serialization, Typing, typecheck
  from nemo.core.neural_types import LabelsType, LengthsType, LogprobsType, LossType, NeuralType
label_desc: Use image node_id 3 to create a new CTCLoss object from inherited base classes: nn, Serialization, Typing with example: obj = CTCLoss(num_classes, zero_infinity, reduction)