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: Load pretrained model from PaSST.
docstr_tok: ["Load","pretrained","model","from","PaSST","."]
code: def _load_base_model(self, pretrained_length: tp.Optional[float]):
      """Load pretrained model from PaSST."""
      try:
          if pretrained_length == 30:
              from hear21passt.base30sec import get_basic_model  # type: ignore
  
              max_duration = 30
          elif pretrained_length == 20:
              from hear21passt.base20sec import get_basic_model  # type: ignore
  
              max_duration = 20
          else:
              from hear21passt.base import get_basic_model  # type: ignore
  
              # Original PASST was trained on AudioSet with 10s-long audio samples
              max_duration = 10
          min_duration = 0.15
          min_duration = 0.15
      except ModuleNotFoundError:
          raise ModuleNotFoundError(
              "Please install hear21passt to compute KL divergence: ",
              "pip install 'git+https://github.com/kkoutini/passt_hear21@0.0.19#egg=hear21passt'",
          )
      model_sample_rate = 32_000
      max_input_frames = int(max_duration * model_sample_rate)
      min_input_frames = int(min_duration * model_sample_rate)
      with open(os.devnull, "w") as f, contextlib.redirect_stdout(f):
          model = get_basic_model(mode="logits")
      return (
          model,
          model_sample_rate,
          max_input_frames,
          min_input_frames,
      )
  
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 3 for calling the PasstKLDivergenceMetric obj's underlying member method code with example usage: obj._load_base_model(pretrained_length) and returns: model,  model_sample_rate,  max_input_frames,  min_input_frames