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."
      predictions, lens = predictions
      phns, phn_lens = batch.phn_encoded
      loss = self.hparams.compute_cost(
          predictions, phns, lens, phn_lens
      )
  
      if stage != sb.Stage.TRAIN:
          seq = sb.decoders.ctc_greedy_decode(
              predictions, lens, blank_id=self.hparams.blank_index
          )
          self.per_metrics.append(
              batch.id, seq, phns, target_len=phn_lens
          )
  
      return loss
  
file_path: speechbrain/tests/integration/ASR_CTC/example_asr_ctc_experiment.py
imports: import pathlib
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 2 for calling the CTCBrain obj's underlying member method code with example usage: obj.compute_objectives(predictions, batch, stage) and returns: loss