docstr: Computes the loss using speaker-id as label.
          
code: def compute_objectives(self, predictions, batch, stage):
      """Computes the loss using speaker-id as label."""
      emoid, _ = batch.emo_encoded
  
      """to meet the input form of nll loss"""
      emoid = emoid.squeeze(1)
      loss = self.hparams.compute_cost(predictions, emoid)
      if stage != sb.Stage.TRAIN:
          self.error_metrics.append(batch.id, predictions, emoid)
  
      return loss
  
file_path: speechbrain/recipes/IEMOCAP/emotion_recognition/train_with_wav2vec2.py
imports: import os
  import sys
  import speechbrain
  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