code: def forward(self, log_probs, targets, input_lengths, target_lengths):
      # override forward implementation
      # custom logic, if necessary
      input_lengths = input_lengths.long()
      target_lengths = target_lengths.long()
      targets = targets.long()
      # here we transpose because we expect [B, T, D] while PyTorch assumes [T, B, D]
      log_probs = log_probs.transpose(1, 0)
      loss = super().forward(
          log_probs=log_probs,
          targets=targets,
          input_lengths=input_lengths,
          target_lengths=target_lengths,
      )
      if self._apply_reduction:
          loss = self.reduce(loss, target_lengths)
      return loss
  
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 5 for calling the CTCLoss obj's underlying member method code with example usage: obj.forward(log_probs, targets, input_lengths, target_lengths) and returns: loss