class_docstr: Speech Quality and Intelligibility Measures (SQUIM) model that predicts **subjective** metric scores
  for speech enhancement (e.g., Mean Opinion Score (MOS)). The model is adopted from *NORESQA-MOS*
  :cite:`manocha2022speech` which predicts MOS scores given the input speech and a non-matching reference.
  
  Args:
      ssl_model (torch.nn.Module): The self-supervised learning model for feature extraction.
      projector (torch.nn.Module): Projection layer that projects SSL feature to a lower dimension.
      predictor (torch.nn.Module): Predict the subjective scores.
class_docstr_tok: ["Speech","Quality","and","Intelligibility","Measures","(","SQUIM",")","model","that","predicts","*","*","subjective","*","*","metric","scores","for","speech","enhancement","(","e.g.",",","Mean","Opinion","Score","(","MOS",")",")",".","The","model","is","adopted","from","*","NORESQA-MOS","*",":","cite",":","`","manocha2022speech","`","which","predicts","MOS","scores","given","the","input","speech","and","a","non-matching","reference",".","Args",":","ssl_model","(","torch.nn.Module",")",":","The","self-supervised","learning","model","for","feature","extraction",".","projector","(","torch.nn.Module",")",":","Projection","layer","that","projects","SSL","feature","to","a","lower","dimension",".","predictor","(","torch.nn.Module",")",":","Predict","the","subjective","scores","."]
docstr: Predict subjective evaluation metric score.
  
  Args:
      waveform (torch.Tensor): Input waveform for evaluation. Tensor with dimensions `(batch, time)`.
      reference (torch.Tensor): Non-matching clean reference. Tensor with dimensions `(batch, time_ref)`.
  
  Returns:
      (torch.Tensor): Subjective metric score. Tensor with dimensions `(batch,)`.
docstr_tok: ["Predict","subjective","evaluation","metric","score",".","Args",":","waveform","(","torch.Tensor",")",":","Input","waveform","for","evaluation",".","Tensor","with","dimensions","`","(","batch",",","time",")","`",".","reference","(","torch.Tensor",")",":","Non-matching","clean","reference",".","Tensor","with","dimensions","`","(","batch",",","time_ref",")","`",".","Returns",":","(","torch.Tensor",")",":","Subjective","metric","score",".","Tensor","with","dimensions","`","(","batch",",",")","`","."]
code: def forward(self, waveform: torch.Tensor, reference: torch.Tensor):
      """Predict subjective evaluation metric score.
  
      Args:
          waveform (torch.Tensor): Input waveform for evaluation. Tensor with dimensions `(batch, time)`.
          reference (torch.Tensor): Non-matching clean reference. Tensor with dimensions `(batch, time_ref)`.
  
      Returns:
          (torch.Tensor): Subjective metric score. Tensor with dimensions `(batch,)`.
      """
      waveform, reference = self._align_shapes(waveform, reference)
      waveform = self.projector(
          self.ssl_model.extract_features(waveform)[0][-1]
      )
      reference = self.projector(
          self.ssl_model.extract_features(reference)[0][-1]
      )
      concat = torch.cat((reference, waveform), dim=2)
      score_diff = self.predictor(
          concat
      )  # Score difference compared to the reference
      return 5 - score_diff
  
file_path: audio/src/torchaudio/models/squim/subjective.py
imports: from typing import Tuple
  import torch
  import torch.nn
  import torchaudio
label_desc: Use image node_id 3 for calling the SquimSubjective obj's underlying member method code with example usage: obj.forward(waveform, reference) and returns: unknown