class_docstr: KL-Divergence metric based on pre-trained PASST classifier on AudioSet.
  
  From: PaSST: Efficient Training of Audio Transformers with Patchout
  Paper: https://arxiv.org/abs/2110.05069
  Implementation: https://github.com/kkoutini/PaSST
  
  Follow instructions from the github repo:
  ```
  pip install 'git+https://github.com/kkoutini/passt_hear21@0.0.19#egg=hear21passt'
  ```
  
  Args:
      pretrained_length (float, optional): Audio duration used for the pretrained model.
class_docstr_tok: ["KL-Divergence","metric","based","on","pre-trained","PASST","classifier","on","AudioSet",".","From",":","PaSST",":","Efficient","Training","of","Audio","Transformers","with","Patchout","Paper",":","https",":","\/\/arxiv.org\/abs\/2110.05069","Implementation",":","https",":","\/\/github.com\/kkoutini\/PaSST","Follow","instructions","from","the","github","repo",":","``","`","pip","install","'git+https",":","\/\/github.com\/kkoutini\/passt_hear21","@","0.0.19","#","egg=hear21passt'","``","`","Args",":","pretrained_length","(","float",",","optional",")",":","Audio","duration","used","for","the","pretrained","model","."]
docstr: Get model output given provided input tensor.
  
  Args:
      x (torch.Tensor): Input audio tensor of shape [B, C, T].
      sizes (torch.Tensor): Actual audio sample length, of shape [B].
      sample_rates (torch.Tensor): Actual audio sample rate, of shape [B].
  Returns:
      probs (torch.Tensor, optional): Probabilities over labels, of shape [B, num_classes].
docstr_tok: ["Get","model","output","given","provided","input","tensor",".","Args",":","x","(","torch.Tensor",")",":","Input","audio","tensor","of","shape","[","B",",","C",",","T","]",".","sizes","(","torch.Tensor",")",":","Actual","audio","sample","length",",","of","shape","[","B","]",".","sample_rates","(","torch.Tensor",")",":","Actual","audio","sample","rate",",","of","shape","[","B","]",".","Returns",":","probs","(","torch.Tensor",",","optional",")",":","Probabilities","over","labels",",","of","shape","[","B",",","num_classes","]","."]
code: def _get_label_distribution(
      self,
      x: torch.Tensor,
      sizes: torch.Tensor,
      sample_rates: torch.Tensor,
  ) -> tp.Optional[torch.Tensor]:
      """Get model output given provided input tensor.
  
      Args:
          x (torch.Tensor): Input audio tensor of shape [B, C, T].
          sizes (torch.Tensor): Actual audio sample length, of shape [B].
          sample_rates (torch.Tensor): Actual audio sample rate, of shape [B].
      Returns:
          probs (torch.Tensor, optional): Probabilities over labels, of shape [B, num_classes].
      """
      all_probs: tp.List[torch.Tensor] = []
      for i, wav in enumerate(x):
          sample_rate = int(sample_rates[i].item())
          wav_len = int(sizes[i].item())
          wav_segments = self._process_audio(wav, sample_rate, wav_len)
          for segment in wav_segments:
              probs = self._get_model_preds(segment).mean(dim=0)
              all_probs.append(probs)
      if len(all_probs) > 0:
          return torch.stack(all_probs, dim=0)
      else:
          return None
  
imports: import contextlib
  from functools import partial
  import logging
  import os
  import typing
  import torch
  import torchmetrics
  from ..data.audio_utils import convert_audio
label_desc: Use image node_id 6 for calling the PasstKLDivergenceMetric obj's underlying member method code with example usage: obj._get_label_distribution(x, sizes, sample_rates) and returns: torch, None