class_docstr: Prediction module that apply pooling and attention, then predict subjective metric scores.
  
  Args:
      input_dim (int): Input feature dimension.
      att_dim (int): Attention Tensor dimension.
class_docstr_tok: ["Prediction","module","that","apply","pooling","and","attention",",","then","predict","subjective","metric","scores",".","Args",":","input_dim","(","int",")",":","Input","feature","dimension",".","att_dim","(","int",")",":","Attention","Tensor","dimension","."]
docstr: Predict subjective evaluation metric score.
  
  Args:
      x (torch.Tensor): Input Tensor with dimensions `(batch, time, feature_dim)`.
  
  Returns:
      (torch.Tensor): Subjective metric score. Tensor with dimensions `(batch,)`.
docstr_tok: ["Predict","subjective","evaluation","metric","score",".","Args",":","x","(","torch.Tensor",")",":","Input","Tensor","with","dimensions","`","(","batch",",","time",",","feature_dim",")","`",".","Returns",":","(","torch.Tensor",")",":","Subjective","metric","score",".","Tensor","with","dimensions","`","(","batch",",",")","`","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """Predict subjective evaluation metric score.
  
      Args:
          x (torch.Tensor): Input Tensor with dimensions `(batch, time, feature_dim)`.
  
      Returns:
          (torch.Tensor): Subjective metric score. Tensor with dimensions `(batch,)`.
      """
      x = self.att_pool_layer(x)
      x = nn.functional.softmax(x, dim=1)
      B = torch.linspace(0, 4, steps=self.att_dim, device=x.device)
      x = (x * B).sum(dim=1)
      return x
  
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 2 for calling the Predictor obj's underlying member method code with example usage: obj.forward(x) and returns: x