docstr: Given the network predictions and targets computed the CTC loss.
code: def compute_objectives(self, predictions, batch, stage):
      "Given the network predictions and targets computed the CTC loss."
      phns, phn_lens = batch.phn_encoded
  
      if stage == sb.Stage.TRAIN:
          predictions, lens = predictions
      else:
          predictions, lens, seq = predictions
          self.per_metrics.append(
              batch.id, seq, phns, target_len=phn_lens
          )
  
      loss = self.hparams.compute_cost(
          predictions,
          phns.to(self.device).long(),
          lens,
          phn_lens.to(self.device),
      )
      return loss
  
file_path: speechbrain/tests/integration/ASR_Transducer/example_asr_transducer_experiment.py
imports: import pathlib
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 2 for calling the TransducerBrain obj's underlying member method code with example usage: obj.compute_objectives(predictions, batch, stage) and returns: loss