class_docstr: Beam search decoder for RNN-T model.
  
  See Also:
      * :class:`torchaudio.pipelines.RNNTBundle`: ASR pipeline with pretrained model.
  
  Args:
      model (RNNT): RNN-T model to use.
      blank (int): index of blank token in vocabulary.
      temperature (float, optional): temperature to apply to joint network output.
          Larger values yield more uniform samples. (Default: 1.0)
      hypo_sort_key (Callable[[Hypothesis], float] or None, optional): callable that computes a score
          for a given hypothesis to rank hypotheses by. If ``None``, defaults to callable that returns
          hypothesis score normalized by token sequence length. (Default: None)
      step_max_tokens (int, optional): maximum number of tokens to emit per input time step. (Default: 100)
class_docstr_tok: ["Beam","search","decoder","for","RNN-T","model",".","See","Also",":","*",":","class",":","`","torchaudio.pipelines.RNNTBundle","`",":","ASR","pipeline","with","pretrained","model",".","Args",":","model","(","RNNT",")",":","RNN-T","model","to","use",".","blank","(","int",")",":","index","of","blank","token","in","vocabulary",".","temperature","(","float",",","optional",")",":","temperature","to","apply","to","joint","network","output",".","Larger","values","yield","more","uniform","samples",".","(","Default",":","1.0",")","hypo_sort_key","(","Callable","[","[","Hypothesis","]",",","float","]","or","None",",","optional",")",":","callable","that","computes","a","score","for","a","given","hypothesis","to","rank","hypotheses","by",".","If","``","None","``",",","defaults","to","callable","that","returns","hypothesis","score","normalized","by","token","sequence","length",".","(","Default",":","None",")","step_max_tokens","(","int",",","optional",")",":","maximum","number","of","tokens","to","emit","per","input","time","step",".","(","Default",":","100",")"]
docstr: Performs beam search for the given input sequence.
  
  T: number of frames;
  D: feature dimension of each frame.
  
  Args:
      input (torch.Tensor): sequence of input frames, with shape (T, D) or (1, T, D).
      length (torch.Tensor): number of valid frames in input
          sequence, with shape () or (1,).
      beam_width (int): beam size to use during search.
  
  Returns:
      List[Hypothesis]: top-``beam_width`` hypotheses found by beam search.
docstr_tok: ["Performs","beam","search","for","the","given","input","sequence",".","T",":","number","of","frames",";","D",":","feature","dimension","of","each","frame",".","Args",":","input","(","torch.Tensor",")",":","sequence","of","input","frames",",","with","shape","(","T",",","D",")","or","(","1",",","T",",","D",")",".","length","(","torch.Tensor",")",":","number","of","valid","frames","in","input","sequence",",","with","shape","(",")","or","(","1",",",")",".","beam_width","(","int",")",":","beam","size","to","use","during","search",".","Returns",":","List","[","Hypothesis","]",":","top-","``","beam_width","``","hypotheses","found","by","beam","search","."]
code: def forward(
      self, input: torch.Tensor, length: torch.Tensor, beam_width: int
  ) -> List[Hypothesis]:
      r"""Performs beam search for the given input sequence.
  
      T: number of frames;
      D: feature dimension of each frame.
  
      Args:
          input (torch.Tensor): sequence of input frames, with shape (T, D) or (1, T, D).
          length (torch.Tensor): number of valid frames in input
              sequence, with shape () or (1,).
          beam_width (int): beam size to use during search.
  
      Returns:
          List[Hypothesis]: top-``beam_width`` hypotheses found by beam search.
      """
      if input.dim() != 2 and not (
          input.dim() == 3 and input.shape[0] == 1
      ):
          raise ValueError("input must be of shape (T, D) or (1, T, D)")
      if input.dim() == 2:
          input = input.unsqueeze(0)
  
      if length.shape != () and length.shape != (1,):
          raise ValueError("length must be of shape () or (1,)")
      if length.dim() == 0:
          length = length.unsqueeze(0)
  
      enc_out, _ = self.model.transcribe(input, length)
      return self._search(enc_out, None, beam_width)
  
imports: from typing import Callable, Dict, List, Optional, Tuple
  import torch
  from torchaudio.models import RNNT
label_desc: Use image node_id 8 for calling the RNNTBeamSearch obj's underlying member method code with example usage: obj.forward(input, length, beam_width) and returns: self