docstr: Given the network predictions and targets computed the NLL loss.
code: def compute_objectives(self, predictions, batch, stage):
      "Given the network predictions and targets computed the NLL loss."
      outputs, seq = predictions
  
      phns, phn_lens = batch.phn_encoded_eos
      loss = self.hparams.compute_cost(outputs, phns, length=phn_lens)
  
      if stage != sb.Stage.TRAIN:
          self.per_metrics.append(
              batch.id, seq, phns, target_len=phn_lens
          )
  
      return loss
  
file_path: speechbrain/tests/integration/G2P/example_g2p.py
imports: import pathlib
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 2 for calling the seq2seqBrain obj's underlying member method code with example usage: obj.compute_objectives(predictions, batch, stage) and returns: loss