docstr: Computes the loss using speaker-id as label.
          
docstr_tok: ["Computes","the","loss","using","speaker-id","as","label","."]
code: def compute_objectives(self, predictions, batch, stage):
      """Computes the loss using speaker-id as label."""
      _, lens = batch.sig
      emoid, _ = batch.emo_encoded
  
      # Concatenate labels (due to data augmentation)
      if stage == sb.Stage.TRAIN:
          if hasattr(self.hparams.lr_annealing, "on_batch_end"):
              self.hparams.lr_annealing.on_batch_end(self.optimizer)
  
      loss = self.hparams.compute_cost(predictions, emoid, lens)
  
      if stage != sb.Stage.TRAIN:
          self.error_metrics.append(batch.id, predictions, emoid, lens)
  
      return loss
  
file_path: speechbrain/recipes/IEMOCAP/emotion_recognition/train.py
imports: import os
  import sys
  import csv
  import speechbrain
  import torch
  from torch.utils.data import DataLoader
  from enum import Enum, auto
  from tqdm.contrib import tqdm
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 2 for calling the EmoIdBrain obj's underlying member method code with example usage: obj.compute_objectives(predictions, batch, stage) and returns: loss